powered by
Reduce the number of nodes used to represent geometries.
# S4 method for SpatVector simplifyGeom(x, tolerance=0.1, preserveTopology=TRUE)
SpatVector of lines or polygons
numeric. The minimum distance between nodes in units of the crs (i.e. degrees for long/lat
logical. If TRUE the topology of output geometries is preserved (polygons remain valid)
TRUE
SpatVector
sharedPaths, gaps
sharedPaths
gaps
# NOT RUN { f <- system.file("ex/lux.shp", package="terra") v <- vect(f) w <- simplifyGeom(v, .02) e <- erase(w) g <- gaps(e) plot(e, lwd=5, border="light gray") polys(g, col="red", border="red") # }
Run the code above in your browser using DataLab