CatchmentZonesField#

class hydromodpy.spatial.CatchmentZonesField(identifier, encoded_codes, encoded_to_zone, nodata_code=0, source_meta=None)[source]#

Bases: object

Compact 3-level zonation stored in Domain.zones.

Attributes#

identifier:

Stable field identifier used by runtime consumers.

encoded_codes:

2D code matrix aligned with domain support.

encoded_to_zone:

Mapping of class codes to semantic labels.

nodata_code:

Background/nodata class code.

source_meta:

Optional provenance metadata (paths, pipeline tag…).

param identifier:

type identifier:

str

param encoded_codes:

type encoded_codes:

ndarray

param encoded_to_zone:

type encoded_to_zone:

Mapping[int, str]

param nodata_code:

type nodata_code:

int

param source_meta:

type source_meta:

Mapping[str, str] | None

property zone_keys: tuple[str, ...]#

Ordered tuple of zone labels (excluding nodata).

property shape: tuple[int, int]#

Zone matrix shape.

as_dict()[source]#

Return a lightweight metadata snapshot.

Return type:

dict[str, object]

Parameters: