Pack a terra SpatRaster or matrix into a GLMR Float32 binary buffer (gl_pack_raster_binary)
Source: R/transport.R
gl_pack_raster_binary.RdPack a terra SpatRaster or matrix into a GLMR Float32 binary buffer (gl_pack_raster_binary)
Usage
gl_pack_raster_binary(
raster,
max_cells = 1000000L,
bands = 1L,
bbox = c(-75, 45, -71, 48)
)Arguments
- raster
A
terra::SpatRasterobject, or a numericmatrix.- max_cells
Maximum number of cells to stream (downsamples overview if exceeded).
- bands
Integer vector of band indices to include (default
1L).- bbox
Numeric vector
c(xmin, ymin, xmax, ymax)whenrasteris a matrix.