Learn R Programming

geozoning (version 1.0.0)

touch.border: touch.border

Description

touch.border

Usage

touch.border(z, boundary)

Arguments

z

a zone (SpatialPolygon)

boundary

union of all zones of the corrected map (result of correctBoundaryMap())

Value

logical, TRUE if zone has a commun boundary with the map, FALSE otherwise

Details

verify if a zone has a commun boundary with the map

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
# zone 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)
# verification
for(i in 1:length(Z)){
  print(touch.border(z = Z[[i]], boundary = boundary))
}
# }

Run the code above in your browser using DataLab