eoio.readers.landsat.metadata.ls_mtd_json module#
eoio.readers.landsat.metadata.ls_mtd_json - reader for Landsat JSON metadata.
- class eoio.readers.landsat.metadata.ls_mtd_json.LSL1ProdJSONReader(json_path: Path | str)[source]#
Bases:
objectLandsat Collection-2 Level-1 JSON metadata reader.
Supports STAC item JSON (preferred) and MTL JSON (limited).
- find_all_band_central_wavelengths() dict[str, float][source]#
Return a mapping of band name to central wavelength (nm).
- Returns:
Dict of {band: wavelength_nm}.
- find_all_band_gsds() dict[str, float][source]#
Return a mapping of band name to GSD (meters).
- Returns:
Dict of {band: gsd_m}.
- find_band_central_wavelength(band: str, default: float | None = None) float[source]#
Return the central wavelength (nm) for a specific band.
- Parameters:
band – Band identifier (e.g., “B2”, “B10”).
default – Value to return if band is not found.
- Returns:
Central wavelength in nm.
- Raises:
KeyError – If band is missing and no default is provided.
- find_epsg(default: int | None = None) int[source]#
Return the EPSG code of the projection from JSON metadata.
- Parameters:
default – Value to return if EPSG not found.
- Returns:
EPSG code as integer.
- Raises:
ValueError – If EPSG is missing and no default is provided.