This is in an incomplete interface to raster writing, for exploring.
filename/path to create
GDAL driver to use (GTiff is default, and recommended)
xmin,xmax,ymin,ymax 4-element vector
dimension of the output, X * Y
projection of the output, best to use a full WKT but any string accepted
number of bands in the output, default is 1
not TRUE by default
the file path that was created
If GeoTIFF is used (driver = "GTiff"
, recommended) then the output is tiled 512x512, and has DEFLATE compression, and
is sparse when created (no values are initiated, so the file is tiny).
Note that there is no restriction on where you can read or write from, the responsibility is yours. In future we will allow control of output tiling and data type etc.
tfile <- tempfile(fileext = ".tif")
if (!file.exists(tfile)) {
vapour_create(tfile, extent = c(-1, 1, -1, 1) * 1e6,
dimension = c(128, 128),
projection = "+proj=laea")
file.remove(tfile)
}
#> Driver GTiff supports Create() method.
#> [1] TRUE