Skip to contents

Sample numerical values from a SpatRaster. The output format depends on the value of the output param.

Usage

.spatraster_sample_values(
  raster_object,
  size = 5000,
  output = c("data.frame", "array", "magick", "EBImage"),
  verbose = NULL,
  ...
)

Arguments

raster_object

terra SpatRaster to sample from

size

rough maximum of pixels allowed when resampling

output

what output to return as. Defaults to "data.frame"

verbose

be verbose

...

additional params to pass to terra::spatSample

Value

magick or EBImage image