alsdb.ALSProvider#

class alsdb.ALSProvider(storage_type: str = 'local', uri: str | None = None, url: str | None = None, region: str = 'eu-central-1', credentials: Dict[str, str] | None = None, s3_config_overrides: Dict[str, str] | None = None)[source]#

Read interface for the ALS TileDB array.

Inherits storage and context management from TileDBProvider and exposes spatial queries that return pandas.DataFrame or xarray.Dataset.

All query methods accept an optional year parameter. When provided, only points from that survey year are returned. When None, all years are returned and the result DataFrame includes a Year column.

Parameters:
  • storage_type"local" or "s3".

  • uri – Array URI (filesystem path or s3:// URI).

  • url – S3 endpoint URL (required for S3 storage).

  • region – S3 region.

  • credentials – S3 credentials dict (keys: "AccessKeyId", "SecretAccessKey", "SessionToken").

  • s3_config_overrides – Raw TileDB vfs.s3.* overrides.

__init__(storage_type: str = 'local', uri: str | None = None, url: str | None = None, region: str = 'eu-central-1', credentials: Dict[str, str] | None = None, s3_config_overrides: Dict[str, str] | None = None) None[source]#

Methods

__init__([storage_type, uri, url, region, ...])

array_exists()

Return True if the TileDB array already exists.

available_years()

Return the sorted list of survey years present in the array.

get_available_attributes()

Return the list of attribute names present in the array schema.

open(mode)

Open the TileDB array in the given mode ("r" or "w").

query_bbox(min_x, min_y, max_x, max_y[, ...])

Query all points within a bounding box.

query_tile(tile_x_km, tile_y_km[, ...])

Query all points within a PNOA tile identified by its km-grid coordinates.

to_dataframe(min_x, min_y, max_x, max_y[, ...])

Alias for query_bbox — returns a pandas.DataFrame.

to_xarray(min_x, min_y, max_x, max_y[, ...])

Query a bounding box and return an xarray.Dataset.

Attributes

schema

Return (and cache) the array schema.