voronoi.Rd
Compute a vornoi tesselation of a map for a set of points.
voronoi(x, ext, eps = 1e-09)
x | SpatialPoints* or two-column matrix or data.frame with x and y coordinates. |
---|---|
ext | Extent object. |
eps | Numerical tolerance used in triangulation. See |
SpatialPolygonsDataFrame.
pts <- data.frame(x = c(1:2, 2), y = c(1, 1:2)) region <- raster::extent(c(0, 3, 0, 3)) sp::plot(voronoi(pts, region))points(pts)