Description Usage Arguments Details Examples
zone.extended
1 | zone.extended(z, boundary)
|
z |
a zone of the map |
boundary |
union of all zones of the corrected map (result of correctBoundaryMap()) |
for a zone that has commun border with the map, it will be extended at the side of commun border. We search the commun border which is a spatiaLines. This spatialLines is composed of several Lines containing only 2 points. For each Lines, we project the 2 points to the convexHull of the "relaxation" of the map's boundary. We have then 4 points (2 come from a Line, 2 come from the projection). with 4 points, we will have a SpatialPolygone which is the extension part of the Line.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | seed=1
map = genMap(DataObj=NULL,seed=seed,disp=FALSE,krig=2,typeMod="Exp",nPointsK=500)
criti = correctionTree(qProb = c(0.5), map = map)
Z = criti$zk[[1]][[1]]$zonePolygone
lab = criti$zk[[1]][[1]]$lab
# zones' correction
res = correctBoundaryMap(Zi = Z, map = map)
Z = res$Z
# map boundary after correction
boundary = Z[[1]]
for(i in 2:length(Z)){
boundary = rgeos::gUnion(boundary, Z[[i]])
}
# plot map
plotM(map = map, Z = Z, lab = lab, byLab = FALSE)
# extend zone
z = geozoning:::zone.extended(z = Z[[1]], boundary = boundary)
sp::plot(z)
sp::plot(Z[[1]],add=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.