boundaries (edges) detection
boundaries.RdDetect boundaries (edges). boundaries are cells that have more than one class in the 4 or 8 cells surrounding it, or, if classes=FALSE, cells with values and cells with NA.
Usage
# S4 method for class 'RasterLayer'
boundaries(x, type='inner', classes=FALSE, directions=8, asNA=FALSE, filename="", ...)Arguments
- x
RasterLayer object
- type
character. 'inner' or 'outer'
- classes
character. Logical. If
TRUEall different values are (after rounding) distinguished, as well asNA. IfFALSE(the default) only edges betweenNAand non-NAcells are considered- directions
integer. Which cells are considered adjacent? Should be 8 (Queen's case) or 4 (Rook's case)
- asNA
logical. If
TRUE, non-edges are returned asNAinstead of zero- filename
character. Filename for the output RasterLayer (optional)
- ...
additional arguments as for
writeRaster


