Learn R Programming

spatialEco (version 1.0-0)

tpi: Topographic Position Index (tpi)

Description

Calculates topographic position using mean deviations

Usage

tpi(x, scale = 3, win = "rectangle", normalize = FALSE)

Arguments

x

A raster class object

scale

The focal window size

win

Window type. Options are "rectangle" and "circle"

normalize

Apply deviation correction that normalizes to local surface roughness

Value

raster class object of tpi

References

De Reu, J., J. Bourgeois, M. Bats, A. Zwertvaegher, V. Gelorini, et al., (2014) Application of the topographic position index to heterogeneous landscapes. Geomorphology, 186:39-49.

Examples

Run this code
# NOT RUN {
 library(raster)
 data(elev)

# calculate tpi and plot 
  tpi9 <- tpi(elev, scale=9)     
    par(mfrow=c(1,2))
      plot(elev, main="original raster")
      plot(tpi9, main="tpi 9x9")

# }

Run the code above in your browser using DataLab