Skip to contents

collect() 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.

Usage

as_terra(x)

Arguments

x

A matrix or (y, x, band) array from collect() (must carry the gis attribute).

Value

A terra::SpatRaster.