hydromodpy.spatial.geographic.core.hydrographic_network#

Canonical hydrographic-network contract shared across geographic workflows.

Purpose#

Expose one common object for hydrographic networks regardless of how they were obtained:

  • loaded from a reference dataset (data.hydrography),

  • generated from the DEM (geographic.river_network),

  • projected later into narrower downstream views such as RiverMeshTrace.

This module intentionally keeps the contract lightweight and file-oriented so it can bridge existing managers and preprocessors without forcing an immediate storage or runtime refactor.

Functions

canonical_feature_name_for_role(role)

Return the canonical store feature name for one hydrographic-network role.

default_vector_filename_for_role(role)

Return the established on-disk vector filename for one role.

hydrographic_network_naming_contract(role)

Return canonical naming hints for one hydrographic-network role.

measure_linework_length_m(gdf, *[, fallback_crs])

Return total line length in metres after coercing to one metric CRS.

measure_polygon_area_m2(gdf, *[, fallback_crs])

Return total polygon area in m² after coercing to one metric CRS.

project_gdf_for_metric_operations(gdf, *[, ...])

Return gdf in one projected CRS suitable for metric operations.

Classes

HydrographicNetwork(role, source_kind[, ...])

Common hydrographic-network contract for reference and generated networks.

HydrographicNetworks([reference, generated, ...])

Optional bundle of canonical hydrographic networks attached to one run/site.