writeRasterxGEOtop {geotopbricks} | R Documentation |
This function uses writeRaster
to create .asc maps which can be read by GEOtop
Description
This function uses writeRaster
to create .asc maps which can be read by GEOtop
Usage
writeRasterxGEOtop(
x,
filename = NULL,
overwrite = TRUE,
NAflag = -9999,
use.decimal.formatter = FALSE,
start.from.zero = FALSE,
keyword,
wpath,
suffix.ext = ".asc",
...
)
Arguments
x |
a Raster object, see |
filename |
see |
overwrite |
logical. Default is |
NAflag |
numeric. Dafauli is -9999, see |
use.decimal.formatter |
logical value. Default is |
start.from.zero |
logical value. Default is |
keyword |
geotop keyword to be used to extract the raster file name from |
wpath |
simulation folder containing |
suffix.ext |
charachter string to be added to the |
... |
further arguments of |
Note
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.
Examples
library(geotopbricks)
## Simulation working path
#file <- paste0("https://raw.githubusercontent.com/ecor/geotopbricks_doc/master/template/",
#"rendena100/SnowDepthMapFile-2014-MA-mean-winter-2013-2014.asc")
file <- system.file("ex/elev.tif", package="terra")
elev <- raster(file)
elevfile <- rasterTmpFile()
extension(elevfile) <- ".asc"
writeRasterxGEOtop(x=elev,file=elevfile)