separationPoly: separationPoly

Description Usage Arguments Details Value Examples

Description

separationPoly

Usage

1
separationPoly(polyTot)

Arguments

polyTot

a SpatialPolygons object

Details

separates holes and non holes

Value

a SpatialPolygons with holes in separate polygons

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(mapTest)
cL=list()
cL=contourAuto(cL,mapTest$step,mapTest$xsize,mapTest$ysize,mapTest$krigGrid,c(5,7),mapTest$boundary)
plot(mapTest$boundary,type="l",col="red")
graphics::lines(cL[[8]])
pG=polyToSp2(sp::Polygon(mapTest$boundary)) # transform boundary into SpatialPolygons objects
cLSp=maptools::ContourLines2SLDF(list(cL[[8]])) # transform contour line into SpatialLines objects
polyBuff=rgeos::gBuffer(cLSp,width=0.00001) # extend geometry
polyDiff=rgeos::gDifference(pG,polyBuff)
recupPoly=geozoning:::separationPoly(polyDiff)
Z1=list(recupPoly[[1]],recupPoly[[2]])
plotZ(Z1)

geozoning documentation built on May 2, 2019, 9:43 a.m.