hydromodpy.data.schemas.catchment#

Contract for catchment polygon payloads.

A catchment is represented by a geopandas.GeoDataFrame with geometry, CRS and area attributes. We validate:

  • the object is a non-empty GeoDataFrame

  • every geometry is a (Multi)Polygon

  • the CRS is declared

  • the reported area in square kilometres is positive

  • an outlet column is present or can be derived

Functions

validate_catchment(gdf[, contract, context])

Validate a catchment polygon payload.

Classes

CatchmentPolygonSchema([min_area_km2, ...])

Declarative constraints for a catchment polygon payload.