Computes river hierarchies from a routed river network.

river_hierarchy(river, type = "strahler", riverID = "riverID")

Arguments

river

An 'sf' linestring feature representing a river network.

type

Type hierarchy to compute. Currently only strahler stream order implemented.

riverID

A character string which specifies the name of the column in river containing unique river network identifiers. Defaults to "riverID".

Value

Returns the river network with added column with the selected river hierarchy.

Examples

if (FALSE) { library(hydrostreamer) library(dplyr) # load data data(river) # without prior routing river <- river_hierarchy(river, riverID="ID") # with routed network routed_river <- river_network(river, riverID = "ID") %>% river_hierarchy() }