easysnowdata.aoi.parse_aoi#

easysnowdata.aoi.parse_aoi(aoi: Any, *, clip: bool | None = None, crs: Any = None, resolution: float | tuple[float, float] | Resolution | None = None) AOI[source]#

Parse any supported spatial input into an AOI.

Parameters:
  • aoi – One of: (west, south, east, north) in EPSG:4326 (west > east crosses the antimeridian); a shapely geometry or GeoJSON-like mapping in EPSG:4326; a GeoDataFrame or GeoSeries in any CRS (rows are unioned; a missing CRS is assumed to be EPSG:4326 with a warning); an odc.geo.geobox.GeoBox; an existing AOI; or None for the whole globe.

  • clip – Stored on the AOI for loaders (§2.1: clip=False returns covering tiles or granules instead of a clipped result). None (default) keeps the flag of an existing AOI and means True for every other input.

  • crs – When both are given, a target GeoBox is attached (see AOI.to_geobox()). crs="utm" picks the UTM zone.

  • resolution – When both are given, a target GeoBox is attached (see AOI.to_geobox()). crs="utm" picks the UTM zone.

Raises:
  • TypeError – For unsupported input types.

  • ValueError – For malformed bounds or empty geometries.