basindelin: Delineates hydrological basins

View source: R/cadtools.R

basindelinR Documentation

Delineates hydrological basins

Description

basindelin uses digital elevation data to delineate hydrological or cold-air drainage basins.

Usage

basindelin(dem)

Arguments

dem

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

Details

If dem is a raster object, a raster onbject is returned. This function is used to delineate cold-air drainage basins. It iteratively identifies the lowest elevation pixel of dem, and assigns any of the eight adjoining pixels to the same basin if higher. The process is repeated on all assigned adjoining pixels until no further higher pixels are found. The next lowest unassigned pixel is then identified, a new basin identity assigned and the processes repeated until all pixels are assigned to a basin. Relative to heuristic algorithms, it is slow and run time increases exponentially with size of dtm. However, in contrast to many such algorithms, all basins are correctly seperated by boundaries >0. With large datasets, with > 160,000 pixels, calculations will be slow and basindelin_big() should be used instead

Value

a raster object, two-dimensional array or matrix with individual basins numbered sequentially as integers.

See Also

basindelin_big() for working with large datasets.

Examples

library(raster)
dem <- aggregate(dtm1m, 20)
basins <- basindelin (dem)
plot(basins, main = "Basins")

ilyamaclean/microclima documentation built on Oct. 31, 2023, 11:41 p.m.