CatchmentDelineation#
- class hydromodpy.spatial.CatchmentDelineation(config, initializing)[source]#
Bases:
objectBuild the geographic runtime for one model domain.
The constructor receives a
GeographicConfigand 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_georeferencingReturn CRS, resolution, and spatial bounds for domain construction.
get_domain_surface_topoReturn the DEM-derived topographic surface.
get_geographic_derived_featuresReturn the complete geographic feature bundle, including boundaries and river products.
get_domain_geographic_contextReturn the compact
DomainGeographicContextconsumed byDomain.processingRun geographic preprocessing and hydrate the runtime attributes.
- param config:
- type config:
GeographicConfig- param initializing:
- type initializing:
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:
- 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.
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#
DomainGeographicContextDataclass containing:
surface_topo: DEM-derived topographic surface.watershed_shpandbox_buff_shp: domain support polygons.catchment_area_km2andcatch_def: catchment metadata.x_outletandy_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.
- Parameters:
config (GeographicConfig)
initializing (object)