simplifyGeom | R Documentation |
Reduce the number of nodes used to represent geometries.
## S4 method for signature 'SpatVector'
simplifyGeom(x, tolerance=0.1, preserveTopology=TRUE, makeValid=TRUE)
x |
SpatVector of lines or polygons |
tolerance |
numeric. The minimum distance between nodes in units of the crs (i.e. degrees for long/lat) |
preserveTopology |
logical. If |
makeValid |
logical. If |
SpatVector
sharedPaths
, gaps
, is.valid
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
w <- simplifyGeom(v, .02, makeValid=FALSE)
e <- erase(w)
g <- gaps(e)
plot(e, lwd=5, border="light gray")
polys(g, col="red", border="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.