polygonise | R Documentation |
Convert the Dirichlet tessellation to polygons and clip if so desired.
polygonise(
x,
window = NULL,
clippy = TRUE,
crs = sf::st_crs("EPSG:4326"),
unit,
...
)
x |
Dirichlet tessellation object |
window |
polygon A polygon to clip the dirichlet tessellation - intersection between boundary polygons and polygon |
clippy |
Logical Clip to the bounding box or polgon if polyclip = TRUE. |
crs |
CRS Projection of coordinates default is "EPSG:4326" (lon/lat wgs84) |
unit |
Character The type of area to return. The default is "geo" and returns the area based on the euclidean distance between geographic coordinates. This will default to the values of the raster and presence coordinate system. Alternatively, meters squared "m", kilometers squared "km", or hectares "ha" can be used. |
\dots |
Additional arguments for a polygonise function |
library(sf)
coords <- matrix(runif(2000),ncol=2)
tess <- dirTess(coords)
tess.polys <- polygonise(tess)
plot(st_geometry(tess.polys$polygons), col=hcl.colors(100))
points(coords,col='tomato',pch=16, cex=.3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.