wetness,GRaster-method | R Documentation |
This function creates a raster map with values equal to the topographic wetness index (TWI), which is a measure of how much overland water flow tends to accumulate in or flow away from a location.
## S4 method for signature 'GRaster'
wetness(x)
x |
A |
A GRaster
.
terrain()
, ruggedness()
, geomorphons()
, GRASS manual for module r.topidx
(see grassHelp("r.topidx")
)
if (grassStarted()) {
# Setup
library(terra)
# Elevation raster
madElev <- fastData("madElev")
# Convert to GRaster:
elev <- fast(madElev)
# Terrain ruggedness index:
tri <- ruggedness(elev)
plot(c(elev, tri))
# Topographic wetness index:
twi <- wetness(elev)
plot(c(elev, twi))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.