removeholes: Remove the holes in polygons 'removeholes'

Description Usage Arguments Value Examples

View source: R/Func_GIS.R

Description

Remove the holes in polygons removeholes

Usage

1

Arguments

sp

SpatialPolygons or SpatialPolygonDataFrame

Value

Raster map

Examples

1
2
3
4
5
6
7
8
library(sp)
p.out = Polygon(cbind(c(4,4,6,7,4),c(5,3,2,5,5))  )
p.hole = Polygon(cbind(c(5,6,6,5,5),c(4,4,3,3,4) ), hole = TRUE)
sp <- SpatialPolygons(list(Polygons(list(p.out, p.hole), "1")))
s = removeholes(sp)
par(mfrow=c(1,2))
plot(sp)
plot(s)

happynotes/PIHMgisR documentation built on Jan. 25, 2020, 9:51 p.m.