makeVoronoiPolygons: Make Voronoi polygons from an INLA mesh and boundary

Description Usage Arguments Value See Also Examples

Description

Create Voronoi polygons based on an inla.mesh object and an inla.mesh.segment object specifying the boundary (edge) of the Voronoi polygons.

Usage

1
makeVoronoiPolygons(mesh, boundary)

Arguments

mesh

an inla.mesh object.

boundary

an inla.mesh.segment object used to specify the Voronoi polygons boundary.

Value

An object of SpatialPolygons class.

See Also

Other GIS: bufferMask, condSim, getArea, getPoints, insertRaster, ll2cart, safeMask, sortPolyData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# load packages
library(sp)
library(INLA)

# make a SpatialPolygons object
poly <- SpatialPolygons(list(
Polygons(list(Polygon(matrix(c(0, 11, -10, 10, -10, -5, 0, -5), ncol=2, byrow=TRUE))), ID=1)))

# make mesh
mesh <- inla.mesh.2d(
  boundary = inla.sp2segment(poly),
  max.edge = c(3,5))

# make voronoi polygons
v <- makeVoronoiPolygons(mesh, poly)

SEEG-Oxford/seegMBG documentation built on May 9, 2019, 11:08 a.m.