A cheap check that a raster has not been edited in place (terra::set.values()): reading all the values of a 20-million-cell raster takes about as long as predicting.

rasterSample(r)

Arguments

r

A SpatRaster, or anything else (returned as NULL).

Value

The values, or NULL.