Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/Function_SinkFill.r
Implementation of sinkfill algorithm based on Wang and Liu (2006).
1 | SinkFill( DEM, Boundary, min_angle = 0.00001)
|
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 |
min_angle |
Numeric object of angle to make slope between cells (unit: rad) |
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).
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.
Kwanghun Choi
Volker Wichmann (2007). Module Fill Sinks (Wang & Liu). SAGA-GIS Module Library Documentation (v2.1.3) [ cited 2015. 08. 15 ], Available from: http://www.saga-gis.org/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.
Potato.Convex
for the description of the data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.