View source: R/writeRasterxgeotop.R
writeRasterxGEOtop | R Documentation |
writeRaster
to create .asc maps which can be read by GEOtopThis 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",
...
)
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 |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.