
Compute and add Strahler stream order to a directed acyclic network
Source:R/network_properties.R
get_streamorder.RdSame topological approach as [get_hydroseq()] (igraph topo-sort), with no non-dendritic/divergence handling required. Leaves are order 1; at each node the order is the max of its upstream contributors, incremented by 1 when that max is shared by two or more of them (Strahler).
See also
Other network properties:
accumulate_downstream(),
get_hydroseq(),
get_levelpath(),
get_pathlength(),
get_pfafstetter(),
get_streamlevel(),
hf_upstream_index(),
merge_groups(),
upstream_index()
Examples
# two headwaters (1,2) join at 3 -> outlet: 3 is order 2
get_streamorder(data.frame(flowpath_id = c("1", "2", "3"),
flowpath_toid = c("3", "3", "0")))
#> [1] 1 1 2