rmHoles: Remove holes in a polygon

Description Usage Arguments Value Examples

View source: R/misc.R

Description

Remove holes from a SpatialPolygons object. Note that this function #differs from the function findHoles in that it only removes holes contained within the polygon itself, not gaps between the polygon and region boundaries

Usage

1
rmHoles(myPoly, polyName = "notSpecified")

Arguments

myPoly

SpatialPolygons object

polyName

character string to name polygon (defaults to "notSpecified")

Value

SpatialPolygons object with holes removed

Examples

1
2
3
4
withHoles <- bgWater[2]
plot(withHoles, col = "blue", main = "Polygon with Holes")
noHoles <- rmHoles(withHoles)
plot(noHoles, col = "blue", main = "Holes removed")

hdirector/IceCastV2 documentation built on Dec. 9, 2018, 12:27 a.m.