write stars object to gdal dataset (typically: to file)
write_stars(obj, dsn, layer, ...) # S3 method for stars write_stars( obj, dsn, layer = 1, ..., driver = detect.driver(dsn), options = character(0), type = if (is.factor(obj[]) && length(levels(obj[])) < 256) "Byte" else "Float32", NA_value = NA_real_, update = FALSE, normalize_path = TRUE ) # S3 method for stars_proxy write_stars( obj, dsn, layer = 1, ..., driver = detect.driver(dsn), options = character(0), type = "Float32", NA_value = NA_real_, chunk_size = c(dim(obj), floor(2.5e+07/dim(obj))), progress = TRUE ) detect.driver(filename)
object of class
gdal dataset (file) name
attribute name; if missing, the first attribute is written
passed on to gdal_write
driver driver name; see st_drivers
character vector with dataset creation options, passed on to GDAL
character; output binary type, one of:
Byte for eight bit unsigned integer,
UInt16 for sixteen bit unsigned integer,
Int16 for sixteen bit signed integer,
UInt32 for thirty two bit unsigned integer,
Int32 for thirty two bit signed integer,
Float32 for thirty two bit floating point,
Float64 for sixty four bit floating point.
non-NA value that should represent R's
NA value in the target raster file; if set to
NA, it will be ignored.
TRUE, an existing file is being updated
logical; see read_stars
length two integer vector with the number of pixels (x, y) used in the read/write loop; see details.
TRUE, a progress bar is shown
character; used for guessing driver short name based on file extension; see examples
write_stars first creates the target file, then updates it sequentially by writing blocks of
obj is a multi-file
stars_proxy object, all files are written as layers into the output file
detect.driver("L7_ETMs.tif") #>  "GTiff"