touch.border: touch.border

Description Usage Arguments Details Value Examples

Description

touch.border

Usage

1
touch.border(z, boundary)

Arguments

z

a zone (SpatialPolygon)

boundary

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

Details

verify if a zone has a commun boundary with the map

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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))
}

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