Learn R Programming

geozoning (version 1.0.0)

optiGrow: optiGrow grow an isolated zone by finding a bigger contour line

Description

optiGrow grow an isolated zone by finding a bigger contour line

Usage

optiGrow(K, iC, qProb, refPoint, map, optiCrit = 2, minSize = 0.012,
  minSizeNG = 0.001, distIsoZ = 0.075, LEQ = 5, MAXP = 0.1,
  simplitol = 1e-12, disp = 0)

Arguments

K

zoning object (such as returned by calNei function)

iC

index of zone to grow

qProb

probability vector used to generate quantile values

refPoint

xxxx

map

object returned by genMap function

optiCrit

criterion choice

minSize

zone area threshold under which a zone is too small to be manageable

minSizeNG

zone area threshold under which a zone will be removed

distIsoZ

threshold distance to next zone, above which a zone is considered to be isolated

LEQ

length of quantile sequence used to grow zone

MAXP

quantile sequence maximum shift

simplitol

tolerance for spatial polygons geometry simplification

disp

0: no info, 1: detailed info

Value

a list with components

crit

criterion value of the new zoning

area

area of the grown zone

Zopti

new zoning geometry (list of SpatialPolygons)

qM

quantile corresponding to new zone

Details

Grow an isolated zone by finding a bigger contour line around it. A series of quantiles are tried out. The quantile sequence is generated by genQseq, and depends on LEQ and MAXP parameters. The zone is grown as much as possible, while keeping it isolated from other zones. A zone is isolated if its smaller distance to another zone is smaller than distIsoZ.

Examples

Run this code
# NOT RUN {
data(mapTest)
qProb=c(0.3,0.5)
criti = correctionTree(qProb,mapTest)
best = criti$zk[[2]][[1]]
Z=best$zonePolygone
plotZ(Z)
refPoint = rgeos::gCentroid(Z[[4]])
sp::plot(refPoint,add=TRUE,col="blue",pch=21)
zg=optiGrow(best,4,qProb,refPoint,mapTest) #grow zone 4
id=as.numeric(getZoneId(Z[[4]]))
linesSp(zg$Zopti[[id]],col="blue") # new zoning with grown zone 4
# }

Run the code above in your browser using DataLab