Learn R Programming

envirem (version 2.3)

topoWetnessIndex: Topographic Wetness Index

Description

SAGA-GIS topographic wetness index

Usage

topoWetnessIndex(dem, sagaEnv)

Value

rasterLayer, unitless

Arguments

dem

elevation rasterLayer, with defined proj4string.

sagaEnv

list object returned from RSAGA::rsaga.env, which supplies appropriate SAGA paths, and parallelization information.

Author

Pascal Title

Details

If this function returns an error, there may be a conflict with the version of SAGA-GIS installed on your machine, and the version of SAGA-GIS that the RSAGA package is designed to work with.

From a DEM, this function will write an appropriate raster to disk, run an RSAGA function to calculate the topographic wetness index, and will then read it back in and return it.

This function requires that SAGA-GIS be installed on your system. SAGA-GIS can be found at http://www.saga-gis.org.

See the documentation for RSAGA::rsaga.env for specifying appropriate paths and parallelization details.

References

Boehner, J., Koethe, R. Conrad, O., Gross, J., Ringeler, A. & Selige, T. (2002) Soil regionalization by means of terrain analysis and process parameterization. Soil Classification 2001 European Soil Bureau, Research Report No. 7 (eds Micheli, E., Nachtergaele, F. & Montanarella, L.), pp. 213-222. Luxembourg.

Conrad, O., Bechtel, B., Bock, M., Dietrich, H., Fischer, E., Gerlitz, L., Wehberg, J., Wichmann, V. & Boehner, J. (2015) System for automated geoscientific analyses (SAGA) v. 2.1.4. Geoscientific Model Development, 8, 1991-2007.

Examples

Run this code
if (FALSE) {
# Find example rasters
rasterFiles <- list.files(system.file('extdata', package='envirem'), full.names=TRUE)
elev <- raster(grep('elev', rasterFiles, value=TRUE))

# setting up appropriate RSAGA environment
sagaEnv <- RSAGA::rsaga.env(modules = '/usr/lib/x86_64-linux-gnu/saga/', cores = 2, 
parallel = TRUE, version = "2.2.0")
topoWetnessIndex(elev, sagaEnv)
}

Run the code above in your browser using DataLab