river_slope: Compute the slope along the river channel

View source: R/dem.r

river_slopeR Documentation

Compute the slope along the river channel

Description

Computes the change in elevation from one reach to the next.

Usage

river_slope(x, dem)

Arguments

x

A river vector layer in sf format, e.g., output from vectorise_stream()

dem

A digital elevation model, preferably a terra::SpatRaster

Value

Vector of slopes, one per reach, map units (e.g., meters of drop per meter of stream)

Examples


    data(kamp_dem)
    x = delineate(kamp_dem)
    vect = vectorise_stream(x$stream, pixel_topology(x))
   vect$slope = river_slope(vect, kamp_dem)


flee-group/watershed documentation built on July 25, 2022, 12:46 p.m.