This function coerces spatstats tessellation objects of class tess to sps SpatialPolygons class. S4-style as() coercion works as well.

as.SpatialPolygons.tess(x)

Arguments

x

spatstat object of class tess to coerce from

Methods

coerce

signature(from = "tess", to = "SpatialPolygons")

Examples

run <- FALSE if (require(spatstat, quietly=TRUE)) run <- TRUE
#> Registered S3 method overwritten by 'spatstat': #> method from #> print.boxx cli
#> #> spatstat 1.61-0 (nickname: ‘Puppy zoomies’) #> For an introduction to spatstat, type ‘beginner’
#> #> Attaching package: ‘spatstat’
#> The following object is masked from ‘package:lattice’: #> #> panel.histogram
if (run) { A <- tess(xgrid=0:4,ygrid=0:4) A_sp <- as(A, "SpatialPolygons") plot(A_sp) text(coordinates(A_sp), labels=row.names(A_sp), cex=0.6) }