Learn R Programming

sptemExp (version 0.1.4)

voronoipolygons2: Generation of Thiesseon Polygons By Points

Description

Generation of Thiessen polygons by spatial points

Usage

voronoipolygons2(x, poly)

Arguments

x

Spatial point object, data format:SpatialPointsDataFrame

poly

The border polygons object to limit the Thiessen polygons. Data format:SpatialPolygonsDataFrame

Value

The spatial polygongs objects. Data format: SpatialPolygonsDataFrame

Examples

Run this code
# NOT RUN {
data("samplepnt","prnside")
x=samplepnt
sidepoly=prnside
prjinf=sp::proj4string(x)
sidepoly_p=sp::spTransform(sidepoly,prjinf)
extBnd=as(raster::extent(sidepoly_p), 'SpatialPolygons')
sp::proj4string(extBnd)=prjinf
pzn.coords=voronoipolygons2(x,extBnd)
sp::proj4string(pzn.coords)=prjinf


# }

Run the code above in your browser using DataLab