tess2spat {animalEKF}R Documentation

Convert Voronoi tessellation tiles to a shapefile.

Description

Convert Voronoi tessellation tiles to a shapefile.

Usage

tess2spat(obj, idvec=NULL)

Arguments

obj

Voronoi tessellation object created through function deldir.

idvec

Optional vector of ids for output shapefile polygons.

Value

Object of class SpatialPolygons.

Author(s)

Samuel Ackerman

Examples


library(deldir)
library(sp)

vortess <- deldir(x=runif(8), y=runif(8), plotit=FALSE, suppressMsge=TRUE)
old_pars <- par(mfcol=par()$mfcol)

par(mfcol=c(1,2))
deldir::plot.deldir(vortess, wlines="tess", xlim=c(0,1), ylim=c(0,1))
vortess_shape <- tess2spat(obj=vortess)
plot(vortess_shape)
par(old_pars)


[Package animalEKF version 1.2 Index]