easysnowdata.terrain.dem.load#

easysnowdata.terrain.dem.load(aoi: Any = None, *, source: str | None = None, resolution: int = 30, items: Any = None, crs: Any = None, grid_resolution: float | None = None, chunks: Any = 'easysnowdata-default', mask: bool = True, **kwargs: Any) DataArray[source]#

Load Copernicus DEM elevation for aoi.

Parameters:
  • aoi – Any form easysnowdata.aoi.parse_aoi() accepts. clip=False on an AOI returns the covering tiles whole.

  • source"planetary-computer" (default, signed) or "earth-search" (unsigned AWS Open Data COGs). Both carry the 2021 release.

  • resolution – 30 or 90 — the DEM product, not the output grid.

  • items – Tiles from search() (a GeoDataFrame or ItemCollection); when given, no search is made.

  • crs – Output grid. crs="utm" reprojects to the AOI’s UTM zone; the native grid (EPSG:4326) is kept when both are None.

  • grid_resolution – Output grid. crs="utm" reprojects to the AOI’s UTM zone; the native grid (EPSG:4326) is kept when both are None.

  • chunks – Dask chunks; the default is the source’s native chunking and None loads eagerly.

  • maskTrue (default, §2.5 for continuous products) replaces the -32767 sentinel with NaN and keeps it as rio.encoded_nodata; False keeps the sentinel with rio.nodata set.

  • **kwargs – Passed to odc.stac.load.

Returns:

xarray.DataArrayelevation in metres, dims latitude/longitude (or y/x when reprojected), lazy unless chunks=None.