Learn R Programming

geozoning (version 1.0.0)

correctBoundaryMap: correctBoundaryMap

Description

correctBoundaryMap

Usage

correctBoundaryMap(Zi, map)

Arguments

Zi

list of initiales zones

map

object returned by function genMap

Value

new list of zones with correct boundary ang the parameter "width" used for correction

Details

function for post treatment of zoning that fixes the problem linked to the border between two neighbour zones and between zones and the map boundary

Examples

Run this code
# NOT RUN {
map=geozoning::mapTest
criti = correctionTree(qProb = c(0.5), map = map)
Z = criti$zk[[1]][[1]]$zonePolygone
lab = criti$zk[[1]][[1]]$lab
plotM(map = map, Z = Z, lab = lab, byLab = FALSE)
class(rgeos::gIntersection(Z[[1]],Z[[2]])) [1]
class(rgeos::gIntersection(Z[[1]],Z[[5]])) [1]
class(rgeos::gIntersection(Z[[2]],Z[[3]])) [1]
class(rgeos::gIntersection(Z[[2]],Z[[4]])) [1]
res = correctBoundaryMap(Zi = Z, map = map)
Z = res$Z
class(rgeos::gIntersection(Z[[1]],Z[[2]])) [1]
class(rgeos::gIntersection(Z[[1]],Z[[5]])) [1]
class(rgeos::gIntersection(Z[[2]],Z[[3]])) [1]
class(rgeos::gIntersection(Z[[2]],Z[[4]])) [1]
plotM(map = map, Z = Z, lab = lab, byLab = FALSE)
# }

Run the code above in your browser using DataLab