Removes user-specified features from a road/pathway layer. This is useful for excluding piers, tunnels, private ways, or other features that should not be used in pedestrian evacuation modeling.
Examples
roads <- terra::vect(
list(
matrix(c(0, 0, 0, 1), ncol = 2, byrow = TRUE),
matrix(c(1, 0, 1, 1), ncol = 2, byrow = TRUE)
),
type = "lines",
crs = "EPSG:3857"
)
roads$kind <- c("road", "pier")
clean_roads(roads, exclude = list(field = "kind", values = "pier"))
#> class : SpatVector
#> geometry : lines
#> dimensions : 1, 1 (geometries, attributes)
#> extent : 0, 0, 0, 1 (xmin, xmax, ymin, ymax)
#> coord. ref. : WGS 84 / Pseudo-Mercator (EPSG:3857)
#> names : kind
#> type : <chr>
#> values : road
