Learn R Programming

geozoning (version 1.0.0)

zoneModifnonIso: zoneModifnonIso

Description

zoneModifnonIso

Usage

zoneModifnonIso(K, qProb, map, zoneClose, iC, simplitol = 0.001, disp = 0)

Arguments

K

zoning object (such as returned by calNei function)

qProb

probability vector used to generate quantile values

map

object returned by function genMap

zoneClose

indices of close zones

iC

current zone index

simplitol

tolerance for spatial polygons geometry simplification

disp

0: no info, 1: detailed info

Value

a zoning object

Details

modify non isolated zone (depends on distIsoZ parameter) so that it is joined to the closest neighbour zone with the same label.

Examples

Run this code
# NOT RUN {
data(mapTest)
qProb=c(0.2,0.5)
ZK = initialZoning(qProb, mapTest)
K=ZK$resZ
Z=K$zonePolygone
plotZ(Z)
resP=detZoneClose(6,Z,K$zoneNModif) # zone 6 is close to zone 5 and zone 7
zoneClose = resP$zoneClose
kmi = zoneModifnonIso(K,qProb,mapTest,zoneClose,6,disp=1)
plotZ(kmi$zonePolygone) # zones 6 and 7 are joined into new zone 6
# now it is the turn of zone 5
Z=kmi$zonePolygone
resP=detZoneClose(5,Z,kmi$zoneNModif) # zone 5 is close to zone 7 and zone 6
kmi2 = zoneModifnonIso(kmi,qProb,mapTest,resP$zoneClose,5,disp=1)
plotZ(kmi2$zonePolygone) # zones 5 and 6 are joined into new zone 5
# }

Run the code above in your browser using DataLab