Learn R Programming

geozoning (version 1.0.0)

voronoiPolygons: voronoiPolygons

Description

voronoiPolygons

Usage

voronoiPolygons(spdata, gridLim = c(0, 1, 0, 1), neighBool,
  PTJUNCTION = FALSE, FULL = FALSE)

Arguments

spdata

SpatialPointsDataFrame

gridLim

list of boundary coordinates

neighBool

empty point neighborhood Logical matrix

PTJUNCTION

logical value, if FALSE (default): pts are not neighbors if their Voronoi polygons only have a vertex in common

FULL

logical value, if FALSE (default): do not return Vornoi polygons

Value

a list with components

surfVoronoi

Voronoi polygons areas

neighBool

Voronoi point neighborhood Logical matrix

if FULL=TRUE (warning: uses a lot of memory space), also:
voronoi

Voronoi polygons

Details

determines the Voronoi neighborhood of data points

See Also

http://www.carsonfarmer.com/2009/09/voronoi-polygons-with-r/

Examples

Run this code
# NOT RUN {
 data(mapTest)
 rx=range(mapTest$krigData$x)
 ry=range(mapTest$krigData$y)
 nx=nrow(mapTest$krigGrid)
 ny=ncol(mapTest$krigGrid)
 nB=matrix(logical((nx*ny)^2),nx*ny,nx*ny) # big matrix
 vP=voronoiPolygons(mapTest$krigData,c(rx,ry),nB)
 length(vP$surfVoronoi) #as many as kriged data points
# }

Run the code above in your browser using DataLab