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). Layers are named after the dataset's bands, or a stack's labels, when the result has them (gis$band_names).

Usage

as_terra(x)

Arguments

x

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

Value

A terra::SpatRaster.