optiRG: optiRG join two zones close to each other

Description Usage Arguments Details Value Examples

Description

optiRG join two zones close to each other

Usage

1
optiRG(K, map, iC, iZC, simplitol = 0.001, disp = 0)

Arguments

K

zoning object (such as returned by calNei function)

map

object returned by function genMap

iC

first zone

iZC

second zone

simplitol

tolerance for spatial polygons geometry simplification

disp

0: no info, 1: detailed info

Details

Within a zoning, two zones close to each other are geometrically joined. The zoning is updated accordingly. If the zone resulting from the junction is not valid, i.e. if it crosses another zone, the function returns NULL.

Value

a zoning object

Examples

1
2
3
4
5
6
7
8
9
data(mapTest)
qProb=c(0.2,0.5)
ZK = initialZoning(qProb, mapTest)
K=ZK$resZ
Z=K$zonePolygone
plotZ(K$zonePolygone) # zoning
kmi=optiRG(K,mapTest,6,7,disp=1)
#zones 6 and 7 are joined into new zone 6
sp::plot(kmi$zonePolygone[[6]],col="red",add=TRUE)

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