flowlength: Calculates the flow distance towards the catchment outlet

View source: R/flowlength.R

flowlengthR Documentation

Calculates the flow distance towards the catchment outlet

Description

Given a digital elevation model and the coordinates of the catchment outlet, this function calculates the flowlength of each gridcell to the outlet, based on a single flow direction algorithm (D8).

Usage

flowlength(DEM,outlet)

Arguments

DEM

A matrix representing a digital elevation model [m] with equally sized pixels and equal NS and EW resolution

outlet

A vector containing the row and column indices of the pixel representing the catchment outlet.

Details

The function returns the flowlength in cell size units. So you have to multiply by the map resolution to get the flow in meters.

Value

A matrix of the same size as DEM

Author(s)

Wouter Buytaert, Imperial College London, based on an implementation from the Hydrology Group of Lancaster University

References

See https://github.com/ICHydro/topmodel for examples.

See Also

sinkfill, river


topmodel documentation built on Nov. 16, 2022, 9:08 a.m.