
Convert a collected result to a terra SpatRaster.
as_terra.Rdcollect() results carry a gis attribute (bbox, CRS, dims); this
wraps the array as a terra::SpatRaster for hand-off to the terra
ecosystem (plotting, zonal statistics, vector ops). Band
names/descriptions are preserved when present.
Arguments
- x
A matrix or
(y, x, band)array fromcollect()(must carry thegisattribute).