Validates a SpatVector once and passes only the invalid geometries to
terra::makeValid(), then recombines them with the already-valid majority.
This avoids running makeValid() over an entire layer – slow on large
records (e.g. national fire perimeters) where only a small fraction of
geometries are invalid. Any geometry that remains invalid or empty after
repair is dropped, so the result contains only valid, non-empty geometries.
repair_geoms(v)A SpatVector, or an object coercible to one via terra::vect().
A SpatVector of valid, non-empty geometries, in the same CRS and
carrying the same attributes; repaired features keep their rows.
Other spatial helpers:
calc_centroid(),
create_bbox(),
extract_coords(),
prep_agg_lonlat_raster(),
save_gpkg(),
spatial_join_intersects()