xdem.DEM.topographic_position_index

xdem.DEM.topographic_position_index#

DEM.topographic_position_index(window_size=3)[source]#

Calculates the Topographic Position Index, the difference to the average of neighbouring pixels. Output is in the unit of the DEM (typically meters).

Based on: Weiss (2001), http://www.jennessent.com/downloads/TPI-poster-TNC_18x22.pdf.

Parameters:

window_size (int) – The size of the window for deriving the metric.

Raises:

ValueError – If the inputs are poorly formatted.

Return type:

TypeVar(RasterType, bound= Raster)