Save a gt_RasterLayer object to disk in a GeoTIFF format.

gt_writeRaster(x, path, overwrite = FALSE)

Arguments

x
gt_RasterLayer object.
path
character file path.
overwrite
character if the file path specifed in path already exists should it be overwritten? Defaults to FALSE.

Value

invisible(). This function is used for its side-effect of producing files on disk.

Examples

## Not run: ------------------------------------ # g <- gt_raster(raster::raster(matrix(runif(9), ncol=3), # crs=sp::CRS('+init=epsg:4326'), # xmn=0, xmx=3, ymn=2, ymx=10)) # gt_writeRaster(g, tempfile(fileext='.tif')) ## ---------------------------------------------