geo-registry

Topographic Position Index

Each cell's elevation minus the mean of its eight neighbours; positive on ridges, negative in valleys.

Pitfall. Some tools compute it over a larger window or standardise it by the window's standard deviation, which is a different number.
Pitfall. Cells on the raster's edge have incomplete neighbourhoods; engines leave them nodata or compute them differently.
About this operation
Also called TPI, difference from mean elevation, gdaldem TPI
Group raster/terrain
Checks raster.nodata
Pitfalls 2 listed above
Columbus tool Not stated
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Not stated

Inputs and outputs

Direction Name Type Geometry Note
Input raster raster Not stated An elevation model.
Output output raster Not stated Not stated

In each engine

Engine Tool Parameters Differences
gdal gdal raster tpi
  • raster → input
  • output → output
None noted
postgis-raster st_tpi
  • raster → rast
None noted
qgis gdal:tpitopographicpositionindex
  • raster → INPUT
  • output → OUTPUT
  • Cells on the raster's edge are left as nodata unless edges are computed (COMPUTE_EDGES).
terra terra::terrain
  • raster → x
None noted
Preset: {"v":"TPI"}
xarray-spatial xrspatial.tpi
  • raster → agg
  • Takes an xarray DataArray; edge cells are NaN by default (boundary = 'nan').