invert_vector {restoptr} | R Documentation |
Invert a vector layer according to the extent of a restopt problem.
Description
Invert a vector layer according to the extent of a restopt problem.
Usage
invert_vector(vector_layer, extent = NULL, filter = NULL)
Arguments
vector_layer |
|
extent |
|
filter |
Optional: filter to apply to |
Details
Invert a vector layer according to its extent, or a user-specified extent. This function is useful to derive locked out areas from accessible areas, e.g. buffer around tracks.
Value
A terra::vect()
Vector object.
Examples
habitat_data <- rast(
system.file("extdata", "habitat_hi_res.tif", package = "restoptr")
)
available <- vect(
system.file("extdata", "accessible_areas.gpkg", package = "restoptr")
)
locked_out <- invert_vector(
vector_layer = available,
extent = ext(habitat_data),
filter = available$ID==2
)
[Package restoptr version 1.0.6 Index]