xrspatial.hydro.stream_order_dinf.stream_order_dinf#
- xrspatial.hydro.stream_order_dinf.stream_order_dinf(flow_dir_dinf: DataArray, flow_accum: DataArray, threshold: float = 100, method: str = 'strahler', name: str = 'stream_order_dinf') DataArray[source]#
Compute stream order from D-infinity flow direction and accumulation.
- Parameters:
flow_dir_dinf (xarray.DataArray or xr.Dataset) – 2D D-infinity flow direction grid. Values are continuous angles in radians in the range
[0, 2*pi).-1.0indicates a pit or flat.NaNindicates nodata.flow_accum (xarray.DataArray) – 2D flow accumulation grid. Cells with
flow_accum >= thresholdare considered stream cells.threshold (float, default 100) – Minimum accumulation to classify a cell as part of the stream network.
method (str, default 'strahler') –
'strahler'for Strahler branching hierarchy or'shreve'for Shreve cumulative magnitude.name (str, default 'stream_order_dinf') – Name of output DataArray.
- Returns:
2D float64 array of stream order values. Non-stream cells (accumulation below threshold) are NaN.
- Return type:
xarray.DataArray or xr.Dataset
References
Tarboton, D.G. (1997). A new method for the determination of flow directions and upslope areas in grid digital elevation models. Water Resources Research, 33(2), 309-319.
Strahler, A.N. (1957). Quantitative analysis of watershed geomorphology. Transactions of the American Geophysical Union, 38(6), 913-920.
Shreve, R.L. (1966). Statistical law of stream numbers. Journal of Geology, 74(1), 17-37.