Description Usage Arguments Details Value Examples
saveZK function called by correctionTree
| 1 2 | saveZK(map, K1, Z2, qProb, listOfZ, indCur, crit, cost, costL, nz, mdist,
  pErr = 0.9, optiCrit = 2, simplitol = 0.001)
 | 
| map | object returned by function genMap | 
| K1 | previous zoning | 
| Z2 | current zoning geometry (list of SpatialPolygons) | 
| qProb | probability vector used to generate quantile values | 
| listOfZ | list of zoning objects | 
| indCur | index of new list element | 
| crit | list of criteria | 
| cost | list of costs | 
| costL | list of per label costs | 
| nz | list of number of zones | 
| mdist | list of distance matrices | 
| pErr | equality tolerance for distance calculations | 
| optiCrit | criterion choice | 
| simplitol | tolerance for spatial polygons geometry simplification | 
Given a map object, a list of zonings, a current and a previous zoning, adds the current zoning to the list of zonings if it has at least 2 zones,after recalculating zone neighborhood and transferring zone labels.
a list with components
updated list of zoning objects, first element corresponds to initial zoning, each other element is a list with each (last if ALL=FALSE) level zoning objects
list of initial distance matrix and all (last if ALL=FALSE) level distance matrices
list of initial criterion and all (last if ALL=FALSE) level criteria
list of initial cost and all (last if ALL=FALSE) level costs
list of initial cost per label and all (last if ALL=FALSE) level costs per label
list of initial number of zones and all (last if ALL=FALSE) level number of zones
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | data(mapTest)
# run zoning with 2 quantiles corresponding to probability values 0.4 and 0.7
criti=correctionTree(c(0.4,0.7),mapTest,LASTPASS=FALSE,SAVE=TRUE)
K1=criti$zk[[1]][[1]]#initial zoning
Z1=K1$zonePolygone
printZsurf(Z1) # 8 zones with 2 small zones (7 and 8)
Z2 = geozoning:::remove1FromZ(Z1,7,K1$zoneN)
printZsurf(Z2) #7 zones
indCur=2
newRes=geozoning:::saveZK(mapTest,K1,Z2,c(0.4,0.7),criti$zk,indCur,
        criti$criterion,criti$cost,criti$costL,criti$nz,criti$mdist)
newZ=newRes$listOfZ[[2]][[1]]$zonePolygone
printZsurf(newZ) #6 zones
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.