flowdir: Calculates flow direction

Description Usage Arguments Details Value Examples

Description

flowdir is used to calculate the direction of flow from every cell of a digital elevation dataset

Usage

1
flowdir(dem)

Arguments

dem

a raster object, two-dimensional array or matrix of elevations.

Details

Flow direction is expressed as given by array(c(1:9), dim = c(3,3)). I.e. 1 = NW, 2 = W, 3 = SW, 4 = N, 5 = to self, 6 = S, 7 = NE, 8 = E and 9 = SE. Flow direction is determined by which adjacent cell has the lowest elevation.

Value

a raster object, two-dimensional array or matrix of flow directions (1-9).

Examples

1
2
dem <- aggregate(dtm1m, 20)
plot(flowdir(dem), main = "Flow direction")

ilyamaclean/ecohydrotools documentation built on June 10, 2019, 5:45 a.m.