as.SpatialPolygons.tess | R Documentation |
This function coerces spatstats tessellation objects of class tess
to sps SpatialPolygons
class. S4-style as() coercion works as well.
as.SpatialPolygons.tess(x)
x |
spatstat object of class |
signature(from = "tess", to = "SpatialPolygons")
Edzer Pebesma edzer.pebesma@uni-muenster.de, Roger Bivand
run <- FALSE
if (require("spatstat.geom", quietly=TRUE)) run <- TRUE
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.