Providers#

easysnowdata.providers#

Thin, generic adapters over the access libraries — no snow knowledge here.

  • stac — pystac-client + odc-stac (Planetary Computer, Earth Search, CMR-STAC)

  • earthdata — earthaccess search / open / download

  • gee — Earth Engine via xee at the native grid

  • planet — Planet Data and Orders APIs via the planet SDK

  • raster_http — COGs and zipped GeoTIFFs over HTTPS, with a pooch cache

  • zarr_cloud — anonymous cloud Zarr stores

  • vector_http — remote GDB / GeoJSON / GeoParquet with bbox or mask pushdown

Every read happens inside easysnowdata._gdal.gdal_env() (and the auth providers’ env()); nothing here configures GDAL, xarray or “today” at import time (§2.9).

gdal_env

Apply GDAL options for the duration of the block (and to lazy reads).

easysnowdata.providers.stac#

STAC search and load: pystac-client for search, odc-stac for lazy loading.

open_catalog

Open a STAC API by name ("planetary-computer", "earth-search", "cmr-lpcloud", "cmr-asf", "cmr-nsidc") or URL.

search

Search a STAC API and return a pystac.ItemCollection.

items_to_geodataframe

Items → GeoDataFrame (EPSG:4326) with id, collection, datetime, the item properties as columns, and the full item dict in stac_item so load() can take a filtered frame back.

geodataframe_to_items

Rebuild pystac.Item objects from a frame made by items_to_geodataframe().

load

Lazily load STAC items into an xarray.Dataset with odc-stac.

odc_load

odc.stac.load with the read environment applied (a low-level helper for callers that build their own load_params).

read_env

GDAL + credential environment for reading assets found in catalog.

easysnowdata.providers.earthdata#

NASA Earthdata via earthaccess: search, open, download (cached).

ensure

Log in (once) and return the earthaccess.Auth.

env

GDAL environment for /vsicurl reads of EDL-protected files.

search

earthaccess.search_data with the package's AOI/time inputs.

granules_to_geodataframe

Granules → GeoDataFrame: id, start, end, size_mb, data_links, geometry.

open

earthaccess.open (fsspec file objects) after an explicit login.

download

earthaccess.download into the easysnowdata cache (<cache>/<subdir>).

hdf4_available

Whether this GDAL build can read HDF4 (HDF-EOS2) files.

require_hdf4

Fail fast when product is HDF4 and GDAL has no HDF4 driver.

easysnowdata.providers.gee#

Google Earth Engine via xee: open at the native grid, features → GeoDataFrame.

import ee and import xee are deferred so a broken Google auth stack cannot break import easysnowdata. Earth Engine is initialised once through easysnowdata.auth; Dask workers re-initialise themselves through ee_init_if_necessary / ee_init_kwargs.

ensure

Initialise Earth Engine once (see the earthengine auth provider).

ee

Return the initialised ee module.

grid_params

Pixel-grid kwargs for xarray.open_dataset(engine="ee").

open_dataset

xarray.open_dataset(engine="ee") at the native grid cropped to aoi.

features_to_geodataframe

An ee.FeatureCollection (or asset id) → GeoDataFrame, filtered to aoi.

geometry

An ee.Geometry for the AOI footprint (EPSG:4326, geodesic=False).

easysnowdata.providers.planet#

Planet Labs via the planet SDK 3.x: Data API search, Orders API delivery.

Thin and generic, like the other providers: it knows how to talk to Planet, not what PlanetScope is. The snow knowledge lives in easysnowdata.optical.planetscope.

Everything goes through one planet.Planet client built by the planet auth provider (easysnowdata.auth.planet), which delegates credential detection and login to the SDK’s own stack. Nothing here configures GDAL: the APIs hand out signed download URLs.

Quota. A Data API search is free. Activating a Data API asset charges the whole scene against the account’s quota, and an order charges the clipped area, which is why create_order() refuses to run without an AOI and why ordering is never part of a test.

ensure

Return the process-wide planet.Planet client, logging in if needed.

client

Alias of ensure(), for symmetry with the other providers.

sdk

Return the imported planet module (a required dependency).

build_search_filter

Build a Data API search_filter from the package's AOI/time inputs.

search

Run a Data API quick-search and return the items as dicts (free).

items_to_geodataframe

Data API items → GeoDataFrame with id, item_type, acquired and the item properties as columns (the same shape every search_* returns).

product

One products entry of an order request.

create_order

Create an Orders API order clipped to aoi, and return the order dict.

wait_order

Block until an order reaches a final state and return that state.

download_order

Download a finished order into the easysnowdata cache and return the paths.

asset_url

Return a signed download URL for one asset of one scene.

easysnowdata.providers.raster_http#

COGs and zipped GeoTIFFs over HTTPS (rioxarray), plus a pooch download cache.

open

Open a raster with rioxarray.open_rasterio inside the read environment.

zip_url

GDAL path for member inside the zip at url.

fetch

Download url once into the cache with a plain GET and return the local path.

easysnowdata.providers.zarr_cloud#

Anonymous cloud Zarr stores (GCS, S3, Azure, HTTPS) with xarray.

storage_options_for

Anonymous-access storage_options for the store's scheme.

open

xarray.open_zarr with anonymous defaults for public buckets.

select

Subset a global lat/lon dataset to an AOI and time range.

easysnowdata.providers.vector_http#

Remote vectors (GDB, GeoJSON, zipped shapefiles, GeoParquet) with pyogrio pushdown.

read

geopandas.read_file with AOI pushdown inside the read environment.

read_parquet

geopandas.read_parquet with bbox pushdown from the AOI (GeoParquet 1.1 bbox column).

zip_path

GDAL/fiona-style zip path: zip+https://…!member or zip:///local.zip!member.