basindelin_big: Delineates hydrological basins for large datasets

View source: R/cadtools.R

basindelin_bigR Documentation

Delineates hydrological basins for large datasets

Description

basindelin_big is for use with large digital elevation datasets, to delineate hydrological or cold-air drainage basins.

Usage

basindelin_big(dem, dirout = NA, trace = TRUE)

Arguments

dem

a raster object of elevations.

dirout

an optional character vector containing a single path directory for temporarily storing tiles. Deleted after use. Tilde expansion (see path.expand()) is done.

trace

a logical value indicating whether to plot and report on progress.

Details

The function basindelin_big divides the large dataset into tiles and then uses basindelin() to delineate basins for each tile before mosaicing back together and merging basins along tile edges if not separated by a boundary greater than 0. If dirout is unspecified, then a directory basinsout is temporarily created within the working directory. If trace is TRUE (the default) then progress is tracked during three stages: (1) the basins of each tile are plotted, (2) basins after mosaicing, but prior to merging are plotted and (3) on each merge iteration, the number of basins to merge is printed and processed basin is plotted.

Value

a raster object with individual basins numbered sequentially as integers.

See Also

basindelin() for working with smaller datasets.

Examples

library(raster)
basins <- basindelin_big(dtm1m)
plot(basins, main = "Basins")

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