constants
This module contains Enums for Sentinel-2 on Copernicus Data Space Ecosystem (CDSE).
CopernicusS2Collection #
Bases: StrEnum
Copernicus Sentinel-2 Collections.
CopernicusS2Property #
Bases: StrEnum
Copernicus Sentinel-2 STAC query properties.
These are standard STAC properties shared across catalogs. The sortby_field
property returns the full JSON path required by the STAC API sortby object.
sortby_field
property
#
sortby_field: str
Returns the full JSON path prefix required by the STAC API sortby object.
CopernicusS2Resolution #
Bases: int, Enum
Copernicus Sentinel-2 Resolutions in meters.
__str__ #
__str__() -> str
Returns the resolution as a string with 'm' suffix.
Source code in src/geospatial_tools/stac/copernicus/constants.py
65 66 67 | |
__repr__ #
__repr__() -> str
Returns the band name as a string.
Source code in src/geospatial_tools/stac/copernicus/constants.py
69 70 71 | |
CopernicusS2Band #
Bases: StrEnum
Copernicus Sentinel-2 Bands for Level-2A.
The value of each member corresponds to the asset key for the band. Base band names (e.g., 'B02') default to their native resolution. Explicit resolution members (e.g., 'B02_20m') are also provided.
native_res
property
#
native_res: int
Returns the native resolution of the band in meters.
Defaults to 10m if band base name is not recognized.
at_res #
at_res(resolution: int | CopernicusS2Resolution) -> str
Returns the asset key for this band at the specified resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int | CopernicusS2Resolution
|
The resolution to get the key for (e.g., 20 or CopernicusS2Resolution.R20M). |
required |
Returns:
| Type | Description |
|---|---|
str
|
The asset key string (e.g., 'B02_20m'). |
Source code in src/geospatial_tools/stac/copernicus/constants.py
184 185 186 187 188 189 190 191 192 193 194 195 | |