getDEM {hydflood} | R Documentation |
Function to obtain the digital elevation models for the active floodplains along the German federal waterways Elbe and Rhine
Description
This function downloads and patches the tiled digital elevation models (dem) along the German federal waterways Elbe and Rhine that have been published on pangaea.de.
Usage
getDEM(filename = "", ext, crs, ...)
Arguments
filename |
supplies an optional in- and output filename and has to be
type |
ext |
argument of type |
crs |
argument of type |
... |
additional arguments as for |
Details
Since the underlying tiled digital elevation models (dem) are rather
large datasets hydflood provides options to permanentely cache these
datasets. options("hydflood.datadir" = tempdir())
is the default. To
modify the location of your raster cache to your needs set the respective
options()
prior to loading the package, e.g.
options("hydflood.datadir" = "~/.hydflood");library(hydflood)
. The
location can also be determined through the environmental variable
hydflood_datadir.
Since downloads of large individual datasets might cause timeouts, it is
recommended to increase options("timeout")
.
Value
SpatRaster
object containing elevation data for the selected
floodplain region.
References
Weber A (2020). “Digital elevation models of German waterway and navigation authorities - Version 0.1.0.” https://doi.org/10.5675/BfG-2011.
Weber A (2020). “Digital elevation model (DEM1) of the River Elbe floodplain between Schmilka and Geesthacht, Germany.” https://doi.org/10.1594/PANGAEA.919293.
Weber A (2020). “Digital elevation model (DEM1) of the River Rhine floodplain between Iffezheim and Kleve, Germany.” https://doi.org/10.1594/PANGAEA.919308.
Examples
options("hydflood.datadir" = tempdir())
options("timeout" = 120)
library(hydflood)
dem <- getDEM(ext = ext(c(309000, 310000, 5749000, 5750000)),
crs = st_crs("EPSG:25833"))