swn.SurfaceWaterNetwork.aggregate#
- SurfaceWaterNetwork.aggregate(segnums, follow_up='upstream_length')#
Aggregate segments (and catchments) to a coarser network of segnums.
- Parameters:
- segnumslist
List of segment numbers to aggregate. Must be unique.
- follow_upstr
Column name in segments used to determine the descending sort order used to determine which segment to follow up headwater catchments. Default ‘upstream_length’. Another good candidate is ‘upstream_area’, if catchment polygons are available.
- Returns:
- SurfaceWaterNetwork
Columns ‘agg_patch’ and ‘agg_path’ are added to segments to provide a segnum list from the original surface water network to the aggregated object. Column ‘agg_unpath’ lists other segnums that flow into ‘agg_path’. Also ‘from_segnums’ is updated to reflect the uppermost segment.
See also
coarsen
Coarsen stream networks to a higher stream order.