easysnowdata.optical.sentinel2.load#
- easysnowdata.optical.sentinel2.load(aoi: Any = None, time: Any = None, *, items: Any = None, bands: str | Sequence[str] | None = None, source: str | None = None, collection: str | None = None, resolution: float | None = None, crs: Any = 'utm', groupby: str = 'solar_day', mask: Any = None, harmonize: bool = True, scale: bool = True, mask_nodata: bool = True, cloud_cover: float | None = None, chunks: dict[str, Any] | None = None, **kwargs: Any) Dataset[source]#
Load Sentinel-2 L2A as a lazy
xarray.Dataset(time,y,x).- Parameters:
aoi – The usual spatial and temporal inputs.
clip=Falseon the AOI returns the covering tiles instead of the cut grid.time – The usual spatial and temporal inputs.
clip=Falseon the AOI returns the covering tiles instead of the cut grid.items – A search result (
GeoDataFrameorItemCollection) to load instead of searching again.bands – Common band names (
DEFAULT_BANDSby default)."scl"is needed for masking.source – Which catalog and collection to read (see
search()).collection – Which catalog and collection to read (see
search()).resolution – Passed to
odc.stac.load;crs="utm"(default) picks the AOI’s UTM zone.crs – Passed to
odc.stac.load;crs="utm"(default) picks the AOI’s UTM zone.groupby – Passed to
odc.stac.load;crs="utm"(default) picks the AOI’s UTM zone.chunks – Passed to
odc.stac.load;crs="utm"(default) picks the AOI’s UTM zone.**kwargs – Passed to
odc.stac.load;crs="utm"(default) picks the AOI’s UTM zone.mask –
None/False(default) keeps every pixel;Trueor"scl-default"removes the legacy default SCL classes (no data, saturated, shadows, clouds, cirrus); a sequence selects classes by name or value.harmonize – Put post-2022-01-25 scenes back on the old baseline: from the items’
raster:bandsoffsets where the catalog provides them, otherwise from the acquisition date (Planetary Computer).scale – Convert the reflectance bands to 0–1 floats.
mask_nodata – NaN-mask the reflectance nodata value (0) and keep it as the encoded nodata.
Falsereturns the raw integers withrio.nodataset.cloud_cover – Passed to
search()when items is not given.