Remove or keep spatial features
Usage
remove_spatial_features(
x,
ids,
key_col = NULL,
invert = FALSE,
prune_empty = TRUE
)
delete_spatial_features(
x,
ids,
key_col = NULL,
invert = FALSE,
prune_empty = TRUE
)
keep_spatial_features(x, ids, key_col = NULL, prune_empty = TRUE)Arguments
- x
An
sfobject.- ids
Feature ids to remove or keep. Matched against
key_colwhen supplied, otherwise against row numbers. Character row ids such as"3"are accepted whenkey_col = NULL.- key_col
Optional stable id column.
- invert
When
FALSE, remove matching features. WhenTRUE, keep only matching features.- prune_empty
Drop empty geometries after filtering.
