Writes a row-major raster (one band) or a band-major 3D array (multi-band) to the VECR raster format. Each tile is encoded as a self-describing tdc block (PRED_2D + BYTE_SHUFFLE + LZ).
vec_write_raster(
x,
path,
dtype = "f32",
tile_size = 512L,
extent = NULL,
gt = NULL,
epsg = 0L,
nodata = NA_real_,
band_names = NULL,
compression = c("fast", "balanced", "max")
)Invisible NULL.
A numeric matrix c(rows, cols) for a single band, or a numeric
3D array c(rows, cols, bands) for multi-band.
Output file path.
Storage dtype, one of "f64", "f32", "i8", "u8",
"i16", "u16", "i32", "u32", "i64", "u64". Defaults to "f32"
for floating-point input — "f64" doubles file size with no information
gain for typical climate rasters.
Square tile edge in pixels. Default 512.
Numeric vector c(xmin, ymin, xmax, ymax). Used together with
the raster dimensions to derive the geotransform. Either extent or
gt must be supplied for georeferenced output.
Numeric(6) GDAL-style geotransform. Overrides extent if both
are given.
EPSG code (integer) or 0L for none.
Nodata value, or NA_real_ to skip recording one.
Optional character vector of length equal to the number of bands.
Compression effort, one of "fast" (single spec, fast
encode), "balanced" (probe two entropy coders, ~2x encode time), or
"max" (probe six candidate specs per tile, slowest encode but
smallest file). Decode cost is unchanged across levels because each
tile records its own codec spec. Default "fast".