wetness: Topographic wetness index

wetness,GRaster-methodR Documentation

Topographic wetness index

Description

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.

Usage

## S4 method for signature 'GRaster'
wetness(x)

Arguments

x

A GRaster (typically representing elevation). The raster must be projected (i.e., not in WGS84, NAD83, et cetera).

Value

A GRaster.

See Also

terrain(), ruggedness(), geomorphons(), module r.topidx in GRASS

Examples

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

}

adamlilith/fasterRaster documentation built on Sept. 23, 2024, 1:28 a.m.