In general, is it possible to convert a terra SpatVectorCollection to a multi-polygon SpatVector so that it can be plotted etc? Specifically, I have a data.frame of extents (bounding boxes) that I need to convert to a set of polygons. I can create a terra SpatVectorCollection but can't get any further. Or, should I be doing this in sf not terra?
library(terra)
library(sf)
exts <- data.frame(xmin = c(-82,80), xmax = c(-80,-78), ymin = c(-2,-2), ymax = c(0,0))
exts.svc <- apply(exts, 1, ext) %>% lapply(as.polygons) %>% svc()
merge(exts.svc) # doesn't work
union(exts.svc) # doesn't work
vect(exts.svc) # doesn't work
