rm_holes: Remove holes in a polygon

Description Usage Arguments Value Examples

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
rm_holes(my_poly, poly_name = "notSpecified")

Arguments

my_poly

SpatialPolygon object

poly_name

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

Value

SpatialPolygon object with holes removed

Examples

1
2
3
4
with_holes <- bg_water[2]
plot(with_holes, col = "blue", main = "Polygon with Holes")
no_holes <- rm_holes(with_holes)
plot(no_holes, col = "blue", main = "Holes removed")

IceCast documentation built on June 24, 2019, 9:03 a.m.