priority_flow.cal_stream_order
Calculate Stream Order functions for PriorityFlow.
This module provides functions for calculating Strahler stream orders using stream segments delineated using the CalcSubbasins function.
Functions
|
Calculate Strahler stream orders using stream segments delineated using the CalcSubbasins function. |
Module Contents
- priority_flow.cal_stream_order.calc_stream_order(basin_id: numpy.ndarray, ds_id: numpy.ndarray, segments: numpy.ndarray | None = None) Dict[str, numpy.ndarray | numpy.ndarray][source]
Calculate Strahler stream orders using stream segments delineated using the CalcSubbasins function.
- Parameters:
basin_id (np.ndarray) – An array of basin IDs (can be obtained from the CalcSubbasins function Summary output column 1 “Basin_ID”)
ds_id (np.ndarray) – Downstream basin IDs, the downstream ID of each basin, should be corresponding to the basin ID (can be obtained from the CalcSubbasins function Summary output Column 6 “Downstream_Basin_ID”)
segments (np.ndarray, optional) – A channel mask with segments assigned with basin IDs (can use the CalcSubbasins ‘segments’ output for this)
- Returns:
A dictionary containing: - ‘summary’: A summary table with a row for every basin with three columns
”Basin_ID”, “Downstream_ID”, “StreamOrder_number”
’order_mask’: (optional) Only available if segments is an input, this will output a spatial raster with the channel orders
- Return type:
Dict[str, np.ndarray]
Notes
This function implements the Strahler stream ordering system where: - First-order streams are those without any tributaries - When two streams of the same order join, the resulting stream is of the next higher order - When streams of different orders join, the resulting stream maintains the higher order