Learn R Programming

topmodel (version 0.7.5)

topidx: Calculation of the topographic index from a DEM raster

Description

Calculation of the topographic index from a DEM raster

Usage

topidx(DEM, resolution, river = NULL)

Value

The function returns a list, containing 2 rasters. Atb are the topographic index values of each grid cell. Area contains the contributing area

Arguments

DEM

A matrix representing a digital elevation model with equally sized pixels and equal NS and EW resolution

resolution

Resolution of the digital elevation model (m)

river

A matrix representing a river map (optional). All cells with values higher than 0 will be treated as river cells and are not included in the calculations.

Author

Wouter Buytaert, Imperial College London, based on routines developed by the hydrology group of Lancaster University

Details

The river map should not contain negative values

References

See https://github.com/ICHydro/topmodel for examples.

See Also

topmodel

Examples

Run this code
  data(huagrahuma.dem)
  topidx <- topidx(huagrahuma.dem, resolution= 25)$atb
  image(topidx)

Run the code above in your browser using DataLab