Description Usage Arguments Details Value Examples
calNei calculate zone neighborhood and assign data points to zones
1 2 |
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) |
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).
a list with components
matrix of zone neigbors
modified matrix with FALSE on the diagonal
indices of pts within each zone
zoning mean data value
vector of zone data mean values
vector of zone areas
vector of filiform zone characteristics
list of zones, each zone is a SpatialPolygons
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.