eoio.readers.landsat.layout module#

eoio.readers.landsat.layout - Helper for Landsat product layout parsing.

class eoio.readers.landsat.layout.LandsatLayout(path: str)[source]#

Bases: object

Layout helper for Landsat products (e.g. Landsat 8 OLI/TIRS L1/L2).

Responsible for filesystem/path logic. No heavy dependencies.

available_band_tokens() Set[str][source]#

Return the unique set of available band tokens based on the product files, e.g.: {‘B1’, ‘B2’, ‘B3’, …’B9’}

Returns:

Set of available band tokens.

default_meas_vars() List[str][source]#

Return the default measurement variables for Landsat to read if user does not specify.

Returns:

List of default measurement variables inferred from filenames.

get_angle_files() Dict[str, str][source]#

Return a dictionary of angle file paths for illumination and viewing angles.

Returns:

Dict of angle file paths.

Raises:

LandsatLayoutError – If any expected angle file is missing.

path: str#
property product_dir: Path#
product_metadata_json() Path | None[source]#

Return the product metadata JSON file for the Landsat product (STAC preferred).

Returns:

Path to the product metadata JSON file, if it exists.

product_metadata_xml() Path | None[source]#

Return the product metadata XML file for the Landsat product.

Returns:

Path to the product metadata XML file, if it exists.

tif_band_files(meas_vars=None) dict[source]#

Return a list of all TIFF files containing band data in the product directory.

Returns:

List of TIFF band file paths.

exception eoio.readers.landsat.layout.LandsatLayoutError[source]#

Bases: ValueError

Raised when a Landsat layout is missing expected files/structure.