getPolySp: getPolySp

Description Usage Arguments Details Value Examples

Description

getPolySp

Usage

1
getPolySp(sp, k = 1)

Arguments

sp

SpatialPolygons object

k

polygon number

Details

get the kth polygon of the current SpatialPolygons

Value

a polygon (object of class Polygon)

Examples

1
2
3
4
5
6
7
ZK=initialZoning(qProb=c(0.4,0.2,0.7),mapTest)
Z=ZK$resZ$zonePolygone
sp=Z[[5]]
P1=geozoning:::getPolySp(sp,1)
P2=geozoning:::getPolySp(sp,2) # second polygon is a hole
plot(P1@coords,type="l")
lines(P2@coords,type="l",col="blue")

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