
D8 flow direction, accumulation and watershed (terra conventions)
Source:R/DemAnalysis.R
D8FlowDirection.RdD8FlowDirection: steepest descent \((z - z_k)/d_k\) coded 1 E, 2
SE, 4 S, 8 SW, 16 W, 32 NW, 64 N, 128 NE, 0 for pits and flats, ties to
the first code (O'Callaghan and Mark 1984). FlowAccumulation:
cells (or weights) draining through each cell, itself included.
Watershed: 1 for cells draining to outlet (row, column).
Identical to the Python arm morie.fn.demops.
Usage
D8FlowDirection(dem, res = 1)
FlowAccumulation(flowdir, weight = NULL)
Watershed(flowdir, outlet)