Skip to contents

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 character.

ext

argument of type SpatExtent.

crs

argument of type crs or crs. It is used to select the respective river (Elbe: 'ETRS 1989 UTM 33N'; Rhine: 'ETRS 1989 UTM 32N')

...

additional arguments as for writeRaster.

Value

SpatRaster object containing elevation data for the selected floodplain region.

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").

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

# \donttest{
  options("hydflood.datadir" = tempdir())
  options("timeout" = 120)
  library(hydflood)
  dem <- getDEM(ext = ext(c(309000, 310000, 5749000, 5750000)),
                crs = st_crs("EPSG:25833"))
# }