R: Simplify geometries

simplify {terra} | R Documentation

## Simplify geometries

### Description

Reduce the number of nodes used to represent geometries.

### Usage

    ## S4 method for signature 'SpatVector'
    simplify(x, tolerance=0.1)

### Arguments

`x` | SpatVector of lines or polygons
`tolerance` | numeric. The minimum distance between nodes in units of the crs (i.e. degrees for long/lat

### Value

SpatVector

### See Also

`sharedPaths`, `gaps`

### Examples

    f <- system.file("ex/lux.shp", package="terra")
    v <- vect(f)
    #w <- simplify(v, .02)
    #e <- erase(w)
    #g <- gaps(e)
    #plot(e, lwd=5, border="light gray")
    #polys(g, col="red", border="red")

[Package terra version 1.4-22 Index]