calNei: calNei calculate zone neighborhood and assign data points to...

Description Usage Arguments Details Value Examples

Description

calNei calculate zone neighborhood and assign data points to zones

Usage

1
2
calNei(Z, spdata, surfVoronoi, ptN, simplitol = 0.001, remove = TRUE,
  correct = FALSE, nmin = 2)

Arguments

Z

zoning geometry (list of SpatialPolygons)

spdata

SpatialPointsDataFrame containing the data pts and values

surfVoronoi

Surfaces of the Voronoi polygons corresponding to data pts

ptN

indices of data pts neighbours

simplitol

tolerance for spatial polygons geometry simplification

remove

if TRUE remove zones with less than nmin data points

correct

if TRUE correct zone neighborhood

nmin

number of points below wich a zone is removed from the zoning (default is 2)

Details

calNei first removes from zoning Z all zones with less than a minimum number of points. Then it calculates zone neighborhood, assigns each data point to a zone, computes zone mean values and areas. It does not assign zone labels (this is done by labZone function for the initial zoning, and by trLabZone function to transfer labels to corrected zonings).

Value

a list with components

zoneN

matrix of zone neigbors

zoneNModif

modified matrix with FALSE on the diagonal

listZonePoint

indices of pts within each zone

meanTot

zoning mean data value

meanZone

vector of zone data mean values

listSurf

vector of zone areas

critSurf

vector of filiform zone characteristics

zonePolygone

list of zones, each zone is a SpatialPolygons

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(mapTest)
ptN=mapTest$krigN
spdata=mapTest$krigData
surfVoronoi=mapTest$surfVoronoi
data(resZTest)
Z=resZTest$zonePolygone
K=calNei(Z,spdata,surfVoronoi,ptN)
names(K)
plotZ(K$zonePolygone)
K=calNei(Z,spdata,surfVoronoi,ptN,nmin=20) #keep only zones with a minimum of 20 data points
plotZ(K$zonePolygone)

hazaeljones/geozoning documentation built on May 30, 2019, 3:06 p.m.