writeRaster to create .asc maps which can be read by GEOtopR/writeRasterxgeotop.R
writeRasterxGEOtop.RdThis function uses writeRaster to create .asc maps which can be read by GEOtop
writeRasterxGEOtop(
x,
filename = NULL,
overwrite = TRUE,
NAflag = -9999,
use.decimal.formatter = FALSE,
start.from.zero = FALSE,
keyword,
wpath,
suffix.ext = ".asc",
...
)a Raster object, see writeRaster. It can be also a RasterBrick-class object.
see writeRaster. It is a vector of string or one string containing a decimal formatter (see brick.decimal.formatter) in case x is a RasterBrick-class object.
logical. Default is TRUE, see writeRaster.
numeric. Dafauli is -9999, see writeRaster.
logical value. Default is FALSE. If it is TRUE or x is a RasterBrick-class object with nlayers(x)!=length(filename) , filename is considered as one string containing a decimal formatter (e.g. "%04d", see brick.decimal.formatter). Otherwise, if filename is considered as a vector string.
logical value. Default is FALSE. If TRUE the formatter starts from 0000, otherwise it starts from 0001.
geotop keyword to be used to extract the raster file name from geotop.inpts file. This is enabled if filename is equal to NULL.
simulation folder containing geotop.inpts file.
charachter string to be added to the keyword value,e.g. possible suffix and extension of the raster file name. Default is ".asc".
further arguments of get.geotop.inpts.keyword.value or writeRaster
It makes use of system functons. It uses *.asc format for raster files.
In case the file name filename is missing and then NULL, it must be imported by the simulation geotop.inpts file.
file <- system.file("ex/elev.tif", package="terra")
elev <- raster(file)
elevfile <- rasterTmpFile()
extension(elevfile) <- ".asc"
writeRasterxGEOtop(x=elev,file=elevfile)