Skip to contents

This function is a wrapper to the function classify to convert flood durations computed with flood3 into potential natural vegetation (PNV) distributions using reclassification rules supplied with df.pnv. Alternative reclassification rules may be applied, but they must match column names and types as given by df.pnv. classify is called with include.lowest = TRUE and right = FALSE.

Usage

classifyToPNV(x, rcl = NULL, filename = "", ...)

Arguments

x

argument of type SpatRaster.

rcl

optional argument of type data.frame with columns and column types as specified in df.pnv.

filename

supplies an optional output filename of type character.

...

additional arguments as for writeRaster.

Value

SpatRaster object containing potential natural vegetation distribution as categorical raster.

References

Ochs K, Egger G, Weber A, Ferreira T, Householder JE, Schneider M (2020). “The potential natural vegetation of large river floodplains – From dynamic to static equilibrium.” Journal of Hydro-environment Research, 30, 71-81. doi:10.1016/j.jher.2020.01.005 .

See also

Examples

# \donttest{
  cache <- tempdir()
  options("hyd1d.datadir" = cache)
  options("hydflood.datadir" = cache)
  options(timeout = 200)
  library(hydflood)
  
  # import the raster data and create a raster stack
  c <- st_crs("EPSG:25833")
  e <- ext(309000, 309300, 5749000, 5749300)
  x <- hydSpatRaster(ext = e, crs = c)
  
  # create a temporal sequence
  seq <- seq(as.Date("2016-01-01"), as.Date("2016-12-31"), by = "day")
  
  # compute a flood duration
  fd <- flood3(x = x, seq = seq)
  
  # reclassify to PNV
  pnv <- classifyToPNV(fd)
  
  # plot pnv map
  plot(pnv)

# }