SinkFill: Sinkfill algorithm based on Wang and Liu (2006)

View source: R/Function_SinkFill.r

SinkFillR Documentation

Sinkfill algorithm based on Wang and Liu (2006)

Description

Implementation of sinkfill algorithm based on Wang and Liu (2006).

Usage

    SinkFill( DEM, Boundary, min_angle = 0.00001)

Arguments

DEM

RasterLayer object of digital elevation model (DEM) which needs sinkfill for DMMF model

Boundary

RasterLayer object for setting the locations of local sinks in the DEM, if Boundary is missing, every boundary cells of the map are set as potential sinks of the map.

min_angle

Numeric object of angle to make slope between cells (unit: rad)

Details

The function is the implementation of sink-fill algorithm from Wang and Liu (2006), which is already implemented as a SAGA-GIS module (see Wichmann (2007)).
The function SinkFill is modified from the original algorithm with including the option to set the initial boundary manually (e.g., global sink of the field).

Value

If Boundary is missing, function automatically identifies internal and external boundary of the input DEM which is in contact with cells having NaN value. The output of the function SinkFill is a list of RasterLayer objects of the sinkfilled DEM ($nosink) and partitions ($partition) of the area for the DMMF model.

Author(s)

Kwanghun Choi

References

Volker Wichmann (2007). Module Fill Sinks (Wang & Liu). SAGA-GIS Module Library Documentation (v2.1.3) [ cited 2015. 08. 15 ], Available from: https://saga-gis.sourceforge.io/saga_tool_doc/2.1.3/ta_preprocessor_4.html

Wang, L. and Liu, H. (2006). An efficient method for identifying and filling surface depressions in digital elevation models for hydrologic analysis and modelling. International Journal of Geographical Information Science, 20(2):193–213.

See Also

Potato.Convex for the description of the data.

Examples

## Not run: 
## Load example data for test running SinkFill function
data(Potato.Convex)
attach(Potato.Convex)
## Run SinkFill function with original DEM which has internal sinks.
DEM_with_sink <- s.map$DEM_original
DEM_sinkfilled <- SinkFill( DEM_with_sink )
DEM_nosink <- DEM_sinkfilled$nosink
partitions <- DEM_sinkfilled$partition
## Check maps
par(mfrow=c(2,2))
plot(DEM_with_sink)
plot(DEM_nosink)
plot(DEM_with_sink - DEM_nosink)
plot(partitions)

## End(Not run)

DMMF documentation built on April 26, 2023, 9:11 a.m.