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:
objectA 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.
- clip#
Whether loaders should clip rasters/vectors to the footprint (
True) or return the covering tiles/granules (False).- Type:
- 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
- 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 > eastacross ±180°).- Type:
(west, south, east, north)in EPSG
- 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.
Noneor"utm"selectsutm_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)