river_hierarchy: Computes river hierarchies for a HS object.

View source: R/river_hierarchy.R

river_hierarchyR Documentation

Computes river hierarchies for a HS object.

Description

Computes river hierarchies from a routed river network.

Usage

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

## Not run: 
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()

## End(Not run)


mkkallio/hydrostreamer documentation built on Oct. 14, 2023, 9:38 p.m.