Learn R Programming

DMMF (version 0.5.1.1)

MapChecker: Map checker for raster layers

Description

Simple boundary, sink and stand checker for DEMs (Digital Elevation Models).

Usage

MapChecker( DEM )

Arguments

DEM

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

Value

The output of the function MapChecker is a RasterLayer object of the boundary, sink, and stand.

Details

Simple boundary, sink and stand checker for DEMs (Digital Elevation Models). The code defines a cell as a

  • boundary: when there are at least one NA values and at least one cell with valid value in adjacent cells.

  • sink: when all adjacent cells of it are higher than the target cell.

  • stand: when all adjacent cells of it are higher than or equal to the target cell.

See Also

Potato.Convex for the description of the data.

Examples

Run this code
# NOT RUN {
## Load example data for test running B_Checker function
data(Potato.Convex)
attach(Potato.Convex)
## Run B_Checker function with original DEM which has internal sinks.
DEM <- s.map$DEM_original
MapCheck <- MapChecker( DEM )
## Check maps
par(mfrow=c(2,2))
plot(DEM)
plot(MapCheck$boundary)
plot(MapCheck$sink)
plot(MapCheck$stand)
# }

Run the code above in your browser using DataLab