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 > eastcrosses 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); anodc.geo.geobox.GeoBox; an existingAOI; orNonefor the whole globe.clip – Stored on the AOI for loaders (§2.1:
clip=Falsereturns covering tiles or granules instead of a clipped result).None(default) keeps the flag of an existingAOIand meansTruefor 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.