Writes x with the GDAL COG driver when available. If that driver is
missing, falls back to a tiled, compressed GeoTIFF. The fallback remains
readable and can support efficient range access, but is not guaranteed to
satisfy the complete COG overview specification.
Arguments
- x
SpatRaster to write.
- filename
Character. Output
.tifpath.- overwrite
Logical. Overwrite an existing file. Default
TRUE.- datatype
Character. Output GDAL datatype: one of
"INT1U","INT1S","INT2U","INT2S","INT4U","INT4S","FLT4S","FLT8S". IfNULL(default), the datatype is probed from the actual cell values of the first layer: integer-valued rasters within the INT4 range are written as"INT4S", everything else as"FLT4S".- ...
Passed to
terra::writeRaster()(for exampleNAflag).