R/spatvector.R
drop_values.Rdterra has no equivalent of x[, character(0)]: subsetting a SpatVector
to zero columns is an error, and x$col <- NULL has to be repeated for every
column. This assigns an empty attribute table instead.
drop_values(x)A SpatVector, or an object coercible to one via terra::vect().
A SpatVector with the same geometries and no attributes.
Useful when a layer is only wanted for its geometry – as the y of an
terra::erase(), for instance, where the attributes are irrelevant and
carrying them only bloats the intermediate.
Other SpatVector helpers:
dissolve_by(),
expanse_planar(),
nn_distance()