easysnowdata.aoi.AOI#

class easysnowdata.aoi.AOI(footprint: GeoDataFrame, clip: bool = True, geobox: GeoBox | None = None, source_crs: CRS = <factory>, crosses_antimeridian: bool = False)[source]#

Bases: object

A parsed area of interest: footprint in EPSG:4326 plus an optional grid.

Build one with parse_aoi(); loaders accept either form.

footprint#

Single-row GeoDataFrame in EPSG:4326. A MultiPolygon when the AOI crosses the antimeridian.

Type:

geopandas.geodataframe.GeoDataFrame

clip#

Whether loaders should clip rasters/vectors to the footprint (True) or return the covering tiles/granules (False).

Type:

bool

geobox#

The native grid when the AOI was built from a GeoBox, else None. to_geobox() returns it when no other grid is requested.

Type:

odc.geo.geobox.GeoBox | None

source_crs#

CRS of the input (EPSG:4326 for tuples and shapely geometries).

Type:

pyproj.crs.crs.CRS

crosses_antimeridian#

True when the footprint straddles ±180°.

Type:

bool

property geometry: Geometry#
Type:

The footprint as one shapely geometry in EPSG

property unwrapped_geometry: Geometry#

The footprint with longitudes in 0…360 when it crosses ±180°.

property bounds: tuple[float, float, float, float]#

4326 (STAC convention: west > east across ±180°).

Type:

(west, south, east, north) in EPSG

property is_global: bool#

True when the footprint covers the whole globe.

property stac_bbox: list[float]#

The bounds as a STAC bbox list.

property stac_intersects: dict[str, Any]#

The footprint as a GeoJSON geometry mapping for STAC intersects.

property utm_crs: CRS#

The UTM zone (or polar stereographic fallback) at the AOI centroid.

to_crs(crs: Any) → GeoDataFrame[source]#

Reproject the footprint, unwrapping it across ±180° for projected CRSs.

total_bounds(crs: Any = 'EPSG:4326') → tuple[float, float, float, float][source]#

Rectangular bounds of the footprint in crs (unwrapped across ±180°).

to_geobox(resolution: float | tuple[float, float] | Resolution | None = None, crs: Any = None, *, shape: int | tuple[int, int] | None = None, anchor: Any = 'default') → GeoBox[source]#

Return a grid covering the footprint.

Parameters:
  • resolution – Pixel size in CRS units (metres for UTM, degrees for EPSG:4326). A scalar gives square pixels with a negative y step.

  • crs – Target CRS. None or "utm" selects utm_crs.

  • shape – Alternative to resolution: number of pixels ((ny, nx) or one value for the longer side).

  • anchor – Passed to odc.geo.geobox.GeoBox.from_geopolygon().

  • built (With no arguments the native GeoBox is returned when the AOI was)

  • required. (from one; otherwise resolution or shape is)

buffer(distance: float) → AOI[source]#

Return a new AOI buffered by distance metres (computed in UTM).

with_clip(clip: bool) → AOI[source]#

Return a copy with the clip flag set to clip.

Examples using easysnowdata.aoi.AOI#

Glacier outlines: Randolph Glacier Inventory 7.0 and 6.0

Glacier outlines: Randolph Glacier Inventory 7.0 and 6.0

Mountain ranges: GMBA Mountain Inventory v2

Mountain ranges: GMBA Mountain Inventory v2

Natural Earth map layers: lakes, rivers, glaciers, places

Natural Earth map layers: lakes, rivers, glaciers, places

ERA5 reanalysis (ARCO-ERA5 and Earth Engine)

ERA5 reanalysis (ARCO-ERA5 and Earth Engine)

Köppen-Geiger climate classification (Beck et al.)

Köppen-Geiger climate classification (Beck et al.)

Basins: HUC, HydroBASINS and GRDC

Basins: HUC, HydroBASINS and GRDC

Forest cover fraction (CGLS-LC100)

Forest cover fraction (CGLS-LC100)

NLCD land cover, annual (USGS)

NLCD land cover, annual (USGS)

MODIS snow cover (MOD10A1, MOD10A1F, MOD10A2)

MODIS snow cover (MOD10A1, MOD10A1F, MOD10A2)

Mountain snow mask (Wrzesien et al.)

Mountain snow mask (Wrzesien et al.)

SNODAS snow water equivalent and depth (NOHRSC)

SNODAS snow water equivalent and depth (NOHRSC)

Seasonal snow classification (Sturm and Liston)

Seasonal snow classification (Sturm and Liston)

UCLA snow reanalysis (Margulis et al.)

UCLA snow reanalysis (Margulis et al.)

VIIRS snow cover (VNP10A1F)

VIIRS snow cover (VNP10A1F)

SNOTEL and snow courses (USDA NRCS AWDB)

SNOTEL and snow courses (USDA NRCS AWDB)

California snow pillows and courses (CDEC)

California snow pillows and courses (CDEC)

British Columbia snow stations (DataBC)

British Columbia snow stations (DataBC)

CHILI heat-load index (CSP ERGo)

CHILI heat-load index (CSP ERGo)

Digital elevation models: Copernicus, NASADEM, SRTM, 3DEP, ALOS, GEDTM30

Digital elevation models: Copernicus, NASADEM, SRTM, 3DEP, ALOS, GEDTM30

Hillshade: Natural Earth shaded relief as a basemap

Hillshade: Natural Earth shaded relief as a basemap

Areas of interest, time ranges and the catalog

Areas of interest, time ranges and the catalog