CatchmentDelineation#

class hydromodpy.spatial.CatchmentDelineation(config, initializing)[source]#

Bases: object

Build the geographic runtime for one model domain.

The constructor receives a GeographicConfig and a workspace-like initialization object. It runs geographic preprocessing immediately and exposes the historical public attributes used by domain, solver, and post-processing code.

The resulting payload includes DEM metadata, watershed and buffer polygons, clipped rasters, derived boundary features, optional river-network products, and georeferencing information.

Main methods#

build_georeferencing

Return CRS, resolution, and spatial bounds for domain construction.

get_domain_surface_topo

Return the DEM-derived topographic surface.

get_geographic_derived_features

Return the complete geographic feature bundle, including boundaries and river products.

get_domain_geographic_context

Return the compact DomainGeographicContext consumed by Domain.

processing

Run geographic preprocessing and hydrate the runtime attributes.

param config:

type config:

GeographicConfig

param initializing:

type initializing:

object

Initialize and run geographic preprocessing.

Parameters#

config

Validated geographic configuration selecting the source mode, catchment definition, DEM inputs, river-network settings, and cache behavior.

initializing

Workspace-like object exposing project_root. Generated geographic artifacts are written below this project root.

param config:

type config:

GeographicConfig

param initializing:

type initializing:

object

build_georeferencing()[source]#

Return the georeferencing metadata needed by Domain.

The returned mapping is intentionally narrow: only the attributes that describe the spatial support are exposed, so callers can pass a small, explicit payload instead of the whole CatchmentDelineation object.

Return type:

dict[str, object]

Returned keys#

  • crs

  • dx

  • dy

  • xmin

  • xmax

  • ymin

  • ymax

dx and dy are exported separately so the raster support can represent non-square cells without silently assuming one single resolution value.

get_domain_surface_topo()[source]#

Return the domain topographic surface as one fully prepared Surface.

This helper keeps the extraction of topography-driven domain objects close to the CatchmentDelineation object that produces the underlying data, while still passing only explicit objects to Domain.

The active extent follows geographic.domain_extent: ‘box’ keeps the full buffered rectangle active (historical default); ‘watershed’ masks the domain to the catchment so recharge and drainage outside it no longer feed the model; ‘watershed_buff’ keeps a buffer ring around the catchment.

get_geographic_derived_features()[source]#

Return the canonical bundle of derived geographic artifacts.

Return type:

GeographicDerivedFeatures

get_domain_geographic_context()[source]#

Return the narrow geographic payload consumed by Domain.

Return type:

DomainGeographicContext

Returns#

DomainGeographicContext

Dataclass containing:

  • surface_topo: DEM-derived topographic surface.

  • watershed_shp and box_buff_shp: domain support polygons.

  • catchment_area_km2 and catch_def: catchment metadata.

  • x_outlet and y_outlet: outlet coordinates when available.

  • watershed_box_buff_dem: DEM on the buffered rectangular support.

  • zone_kind: "catchment" or "uniform" zone semantics.

  • regional_dem_path: regional DEM path for map context.

See Also#

hydromodpy.spatial.geographic.core.domain_geographic_pipeline.DomainGeographicContext

Full field documentation for the returned object.

processing()[source]#

Build and hydrate the full geographic runtime payload.

info_dem()[source]#

Extract metadata and spatial characteristics from generated DEM rasters.

Parameters:
  • config (GeographicConfig)

  • initializing (object)