gedidb.GEDIProvider#
- class gedidb.GEDIProvider(storage_type: str | None = None, s3_bucket: str | None = None, local_path: str | None = None, url: str | None = None, region: str | None = 'eu-central-1', credentials: dict | None = None)[source]#
GEDIProvider class to interface with GEDI data stored in TileDB, with support for flexible storage types.
- ctx#
TileDB context for the configured storage type (S3 or local).
- Type:
tiledb.Ctx
- get_available_variables() pd.DataFrame[source]#
Retrieve a list of available variables with descriptions and units.
- query_nearest_shots(...) Tuple[Dict[str, np.ndarray], Dict[str, np.ndarray]][source]#
Query data for the nearest shots to a specified point.
- query_data(...) Tuple[Dict[str, np.ndarray], Dict[str, np.ndarray]][source]#
Query data within specified spatial and temporal bounds.
- get_data(...) pd.DataFrame | xr.Dataset | None[source]#
Retrieve queried data in either Pandas DataFrame or Xarray Dataset format.
- __init__(storage_type: str | None = None, s3_bucket: str | None = None, local_path: str | None = None, url: str | None = None, region: str | None = 'eu-central-1', credentials: dict | None = None)[source]#
Initialize GEDIProvider with URIs for scalar and profile data arrays, configured based on storage type.
- Parameters:
storage_type (str, optional) – Storage type, either ‘s3’ or ‘local’. Defaults to ‘local’.
s3_bucket (str, optional) – The S3 bucket name for GEDI data storage. Required if storage_type is ‘s3’.
local_path (str, optional) – The local path for storing GEDI data arrays. Used if storage_type is ‘local’.
url (str, optional) – Custom endpoint URL for S3-compatible object stores (e.g., MinIO).
region (str, optional) – AWS region for S3 access. Defaults to ‘eu-central-1’.
Notes
Supports both S3 and local storage configurations based on storage_type.
Methods
__init__([storage_type, s3_bucket, ...])Initialize GEDIProvider with URIs for scalar and profile data arrays, configured based on storage type.
Retrieve metadata for available variables in the scalar TileDB array.
get_data(variables[, geometry, start_time, ...])Retrieve GEDI data based on spatial, temporal, and quality filters, and return it in either Pandas or Xarray format.
query_data(variables[, geometry, ...])Query GEDI data from TileDB arrays within a specified spatial bounding box and time range, applying optional quality filters with flexible filter expressions.
query_nearest_shots(variables, point, ...[, ...])Retrieve data for the nearest GEDI shots around a specified reference point, within a given radius.
to_dataframe(scalar_data)Convert scalar and profile data dictionaries into a unified pandas DataFrame.
to_xarray(scalar_data, metadata, profile_vars)Convert scalar and profile data to an Xarray Dataset, with metadata attached.