waterDepth {hydflood} | R Documentation |
Function to compute water depths SpatRaster
for characteristic
water levels or selected dates
Description
Computes 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.
Usage
waterDepth(x, value = NULL, df = NULL, filename = "", ...)
Arguments
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 |
Details
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.
Value
SpatRaster
object with a numeric
water depth.
See Also
waterLevel
,
waterLevelPegelonline
,
waterLevelFlood2
,
waterLevelFlys3
,
writeRaster
, terraOptions
Examples
options("hydflood.datadir" = tempdir())
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)