waterDepth | R Documentation |
SpatRaster
for characteristic
water levels or selected datesComputes water depths for characteristic water levels or dates
for the active floodplains along the German federal waterways Elbe, Rhine
and the North Sea estuaries based on 1d water levels computed by
waterLevel
, waterLevelPegelonline
,
waterLevelFlood2
or
waterLevelFlys3
provided by package hyd1d.
waterDepth(x, value = NULL, df = NULL, filename = "", ...)
x |
has to by type |
value |
an optional value of type |
df |
an optional object of type |
filename |
supplies an optional output filename and has to be type
|
... |
additional arguments as for |
For the characteristic water level provided in value
(and
df
) waterDepth()
computes a 1d water
level using waterLevelFlood2
along the requested river
section. This 1d water level is transfered to a wl
(water level)
raster layer, which is in fact a copy of the csa
(cross section
areas) layer, and then compared to the dem
(digital elevation model)
layer. Where the wl
layer is higher than the dem
, the
resulting flood extent layer is set to 1.
SpatRaster
object with a numeric
water depth.
waterLevel
,
waterLevelPegelonline
,
waterLevelFlood2
,
waterLevelFlys3
,
writeRaster
, terraOptions
options("hydflood.datadir" = tempdir())
options("timeout" = 200)
library(hydflood)
# import the raster data and create a raster stack
c <- st_crs("EPSG:25833")
e <- ext(309000, 310000, 5749000, 5750000)
x <- hydSpatRaster(ext = e, crs = c)
# compute the water depth
depth <- waterDepth(x = x, value = "MQ")
# plot the product
plot(depth)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.