hydromt.workflows.rivers.river_width#

hydromt.workflows.rivers.river_width(gdf_stream: GeoDataFrame, da_rivmask: DataArray, nmin=5) ndarray[source]#

Return average river width along a segment based on a river mask raster.

For each segment in gdf_stream the associated area is calculated from stream mask and divided by the segment length to obtain the average width.

Parameters:
  • gdf_stream (gpd.GeoDataFrame) – River segments

  • da_rivmask (xr.DataArray) – Boolean river mask in projected grid.

  • nmin (int, optional) – Minimum number of cells in rivmask to calculate the width, by default 5

Returns:

rivwth – Average width per segment in gdf_stream

Return type:

np.ndarray