About Topographic Position Index

Topographic Analysis · TPI Tools · concepts and choosing a scale · by Jeff Jenness

What it is for

The Topographic Position Index is an automated way to identify and classify topographic features, such as hills, valleys, ridges, canyons and plains, according to their height relative to the landscape around them. It needs nothing but a DEM, it is repeatable, and it turns a continuous surface of elevations into the kinds of features that people, and the animals and plants they study, respond to. Weiss (2001) lists the reasons those features matter: soil erosion and deposition, hydrologic balance and response, wind exposure, and cold-air drainage all follow topographic position, and through them so do habitat suitability, community composition, and the distribution and abundance of species. In wildlife work the index has been used to describe how cougars move through a landscape (Dickson and Beier 2007), to build the topographic position factor of a habitat suitability model, and to partition a landscape into canyons, slopes and ridges before defining land facets; in geomorphology, to map landforms across a whole watershed (Tağıl and Jenness 2008).

The catch is that a hill is in the eye of the beholder. What is a hill to a mouse is a ripple to a bighorn or a cougar, and what a road construction crew calls a ridgetop may be a flat plain to the mouse living on it. The same crest of a mountain range is all of these things at once, and none of them is wrong. The index deals with this honestly: it measures height relative to a neighborhood of a chosen size, and the size of that neighborhood is the scale at which the landscape is being read. Choosing it is the analyst's first and most consequential decision, and most of this page is about how to make it.

What the index is

The Topographic Position Index (TPI) is the difference between the elevation of a cell and the mean elevation of a neighborhood around it (Weiss 2001, after Guisan et al. 1999):

TPI= z0 − z¯

where z0 is the elevation of the cell and z̄ is the mean elevation of the cells in its neighborhood. A positive value means the cell stands above its surroundings, as on a ridge or hilltop; a negative value means it sits below them, as in a valley or channel. A value near zero means only that the cell is at about the mean elevation of its neighborhood, which is true both of a flat plain and of an even mid-slope, so slope is used to tell the two apart: near-zero TPI with a gentle slope is a flat, and near-zero TPI with a steep slope is somewhere on the side of a hill.

A horizontal axis from negative TPI on the left, labeled tends towards valleys and canyon bottoms, through zero in the middle, labeled flat areas if slope is shallow and mid-slope areas if significant slope, to positive TPI on the right, labeled tends towards ridgetops and hilltops, with a rainbow color ramp beneath
Reading a TPI value. The sign says whether the cell is above or below its neighborhood; the middle of the range needs slope to be interpreted. From the Topographic Position Index extension manual (Jenness 2006).

Weiss presented the index, and the slope-position and landform classifications built on it, in a poster at the 2001 ESRI International User Conference, as part of work for the EPA's western landscape assessment (Jones et al. 2000). The index itself had been used earlier in species-distribution modeling in the Spring Mountains of Nevada (Guisan et al. 1999). The only input it needs is a DEM, so it can be computed almost anywhere, and the tools on this site compute it, and everything derived from it, with no Spatial Analyst license.

Scale is part of the answer

TPI is a scale-dependent quantity, and the neighborhood is the scale. Weiss's poster gives the example of a meadow in Yosemite Valley: at a scale of 100 m it is a flat plain, which may be the right scale for questions of soil transport or site water balance; at a scale of several kilometers the same point is the bottom of a 1,500 m canyon, which matters more for hydrology, mesoclimate, wind exposure and cold-air drainage.

Three copies of the same terrain profile, a small hill on the floor of a larger valley, with a point on top of the small hill; in A a short neighborhood bar gives TPI near zero, in B a bar spanning the small hill gives TPI greater than zero, and in C a bar spanning the whole valley gives TPI less than zero
One point, three scales. The point sits on a small hill on the floor of a larger valley. In A the neighborhood is so small that the point is at about the mean elevation of the cells around it, so TPI is near zero. In B the neighborhood takes in the whole small hill, the point is well above its neighbors, and TPI is strongly positive. In C the neighborhood reaches the hills on either side of the valley, the point is below its neighbors, and TPI is negative. From the extension manual (Jenness 2006).

All three answers are correct. A point on top of a small hill at the bottom of a canyon is a hilltop at one scale and a canyon bottom at another, and the analyst has to decide which scale is relevant to the question. For the topographic habitat of a large, wide-ranging animal, the classes should be defined in terms of large, distinctive features: a cougar is likely to be influenced far more by a ridgeline hundreds of feet high than by the minor ripples and bumps immediately around it, so a large neighborhood is the right choice. For soil, small plants or surface water, a small one is. In the Spring Mountains study, Guisan et al. (1999) computed the index at four radii, 150, 300, 1,000 and 2,000 m, and offered all four to regression models of 22 plant species. Elevation entered 21 of the models; topographic position at 300, 1,000 or 2,000 m entered 17, the same number as the insolation and northness variables, and the 150 m index entered none. Different species picked different scales, so the ecological characteristics of a site can depend on TPI at several scales at once.

An elevation map of a canyon system, 350 to 2200 meters, and beneath it two TPI maps of the same area: with a 500 meter neighborhood the side drainages and spur ridges stand out in blue and yellow; with a 2000 meter neighborhood the main canyon is a broad blue band and the plateaus around it are yellow
The same DEM at two neighborhood sizes. The 500 m neighborhood picks out the extremes in the side drainages of the canyon; the 2,000 m neighborhood highlights the canyon system as a whole. From the extension manual (Jenness 2006).

The neighborhood defines which cells count as being “around” a cell. A circle takes every cell within a radius; an annulus, the shape Weiss's own examples used, takes only the ring of cells between an inner and an outer radius. On his 30 m DEM the 300 m index used an annulus from 5 to 10 cells and the 2,000 m index an annulus from 62 to 67 cells. Rectangular neighborhoods are used by some researchers, though a circle or annulus is usually the more reasonable choice for ecological analysis, and Weiss proposed wedge-shaped, directional neighborhoods as future work, to separate saddles from flats and ridges from hilltops. The tools here offer circles and annuli, with the radius in cells or in ground units. A cell is in the neighborhood when its center lies within the radius and not otherwise. On a geographic (latitude/longitude) DEM a ground-unit radius is worked out per row on the spheroid, since a degree of longitude shrinks toward the poles; for the neighborhood mean and standard deviation the east-west radius is then rounded to a whole number of cells for each band of rows (the percentile uses the exact value), so the neighborhood is a circle on the ground to within about half a cell east-west at any latitude. One practical point from the Yazoren study below: cells near the edge of a DEM have incomplete neighborhoods, so it pays to run the analysis on an area larger than the study area, by at least the neighborhood radius, and clip afterward.

Slope position: one scale plus slope

Because high TPI means a hilltop or ridge, low TPI means a valley bottom, and near-zero TPI means a flat or a mid-slope depending on the slope, a single TPI raster plus a slope raster can be thresholded into slope-position classes. Weiss's poster illustrates a six-class scheme: valley, lower slope, flat, middle slope, upper slope and ridge.

A terrain profile with short neighborhood bars at five points, labeled lower slope at a notch below a summit with low TPI, ridge at a small bump on the valley floor with very high TPI, middle slope at mid TPI with steep slope, flat slope at mid TPI with shallow slope, and valley at very low TPI
Slope position with a small neighborhood. Each point is judged against only its immediate surroundings, so the bump on the valley floor is a ridge and the notch below the summit is a lower slope. From the extension manual (Jenness 2006).
The same terrain profile with long neighborhood bars: the notch below the summit is now a ridge with very high TPI, the bump on the valley floor is a valley with very low TPI, the middle slope stays a middle slope, the flat becomes a ridge with high TPI, and the small valley stays a valley
The same profile with a large neighborhood. The notch below the summit is now part of the ridge, the bump on the valley floor is part of the valley, and the flat shelf, well above the mean of its wide neighborhood, has become a ridge. From the extension manual (Jenness 2006).

Weiss's six-class scheme sets its TPI thresholds in standard-deviation units, which the next section explains. The system bundled with the Slope Position Classification tool is adapted from that scheme; its classes are:

ClassTPI (standard-deviation units)Slope
ValleyTPI ≤ −1
Lower slope−1 < TPI ≤ −0.5
Flat slope−0.5 < TPI < 0.5≤ 5°
Middle slope−0.5 < TPI < 0.5> 5°
Upper slope0.5 ≤ TPI ≤ 1
RidgeTPI > 1
An elevation map and a slope map of a canyon system feeding two slope-position maps through the Weiss six-class criteria: with a 500 meter neighborhood the valleys in red trace every side drainage and the ridges in blue are small and scattered; with a 2000 meter neighborhood the main canyon is a wide red valley and the plateaus are large blue ridges
Elevation and slope classified into Weiss's six slope-position classes at two neighborhood sizes. At 500 m every side drainage is a valley and every spur a ridge; at 2,000 m the classes describe the canyon and the plateaus. Sample criteria after Weiss (2001); from the extension manual (Jenness 2006).

Simpler schemes set their thresholds directly in elevation units. Dickson and Beier (2007), studying how topographic position influences cougar movement in southern California, used four classes: ridgeline where TPI ≥ 8, canyon bottom where TPI ≤ −8, and the ground between split at a 6° slope into gentle and steep slope. The CorridorDesigner toolbox (Majka et al. 2007) used the same shape with wider thresholds for its topographic-position habitat factor: canyon bottom at TPI ≤ −12, ridgetop at TPI ≥ 12, and flat-gentle versus steep slope split at 6°, with the TPI computed over a 200 m circular neighborhood. The land facet method (Beier and Brost 2010; Brost and Beier 2012) needed only three classes, canyons, slopes and ridges, to partition a landscape before clustering it into land facets; in the Land Facet Corridor Designer, Jenness, Brost and Beier (2013) experimented with neighborhood sizes in three landscapes and settled on a radius of 5 cells with raw TPI thresholds of −6 and +6 m, while advising users to experiment in their own landscapes. All four systems ship with the Slope Position Classification tool, and the Classification System Builder page builds the three-class scheme step by step as its worked example.

Raw versus standardized

TPI thresholds can be set in two very different ways, and the choice decides what the classes mean.

Raw TPI is in the DEM's elevation units. A threshold is then absolute relief: a cell 100 m above its neighborhood mean reads as +100 wherever it occurs, in the mountains or on a plain. This is usually the appropriate form for ecological and wildlife questions, where what an animal experiences is the actual height of the ridge or depth of the canyon, and it is the form Dickson and Beier (2007) used. Its cost is that the thresholds have to be chosen for the landscape at hand, as Weiss (2001) put it: a ridge in Kansas is different from a ridge in central Colorado.

Standardized TPI expresses the value relative to the variability of the terrain, so the thresholds are dimensionless and can be carried from one landscape to another. The bundled systems adapted from Weiss divide each cell's TPI by the standard deviation of the elevations within that cell's neighborhood, so the threshold “1 standard deviation” means one standard deviation of the local relief. (Weiss's poster standardized differently, converting each whole TPI raster to z-scores; see Landforms from two scales below.) The consequence is that cells with identical raw TPI can land in different classes in different parts of the map: a cell must clear a higher bar where its surroundings are more variable. A 1 m rise on a plain and a 100 m rise in the mountains can fall in the same class. That is useful when a classification must adapt to each landscape or be comparable across very different terrains, and misleading when absolute relief is what the question is about.

The Topographic Position Index tool offers five forms of the index, and the classification systems record which form their thresholds assume:

Two older forms deserve a word because they appear in earlier versions of these tools and in the literature. The ArcView extension and the ArcMap Land Facet Corridor Designer tools offered a “standardized TPI” that subtracted the mean TPI of the whole raster and divided by its standard deviation. That is a rescaling of the TPI raster rather than a new measure of position, and because it shifts the zero point, the Land Facet manual warns that it can classify ridges as valleys and vice versa; it was offered only because users had asked for it. Weiss standardized his two TPI rasters in this way before combining them into landforms, for a specific reason: because elevation is spatially autocorrelated, the range of TPI values grows with the neighborhood size, and standardizing lets the same thresholds serve any pair of scales. He added the condition that this should be done only when the mean TPI of each raster is reasonably close to zero, so that subtracting the mean moves the zero point very little. The bundled landform system uses the neighborhood-scale standardization instead, which keeps the zero at the neighborhood mean.

Landforms from two scales

A TPI at one scale says whether a cell is above or below its surroundings. Two TPIs at different scales say something richer: where the cell sits within the small features and, at the same time, where those features sit within the large ones. A cell that is high relative to its immediate surroundings but low relative to the broad landscape is a small hill or ridge inside a larger valley; a cell that is low at the small scale and high at the large scale is an upland drainage or a depression on a plateau. Weiss's poster works this out into ten landform classes.

A terrain profile with both a short and a long neighborhood bar at each of five points, labeled upland drainage where the small-neighborhood TPI is very low and the large very high, hill in valley where the small is very high and the large very low, open slope where both are mid-range with a steep slope, flat hilltop where the small is mid-range and the large high, and deeply incised stream where both are very low
Landform from two neighborhoods. At each point the short bar is the small neighborhood and the long bar the large one; the pair of TPI values names the landform. From the extension manual (Jenness 2006).
A diagram with large-neighborhood TPI on the horizontal axis and small-neighborhood TPI on the vertical axis, with landform names at the ends of eight arrows: sharp ridges and high peaks at the upper right, upland drainages or depressions at the lower right, deeply incised canyons at the lower left, midslope ridges and small hills in larger valleys at the upper left, and tops of mesas, U-shaped canyons, small hills or ridges, and midslope drainages on the four axes
The two scales viewed in graph space. Small-neighborhood TPI runs up the page, large-neighborhood TPI across it, and each direction from the center is a landform. From the extension manual (Jenness 2006).

The ten classes, as bundled with the Landform Classification tool, follow the poster with the class names of the extension manual. SN is the small-neighborhood TPI and LN the large-neighborhood TPI, both in standard-deviation units:

ClassSmall-neighborhood TPILarge-neighborhood TPISlope
1. Canyons, deeply incised streamsSN ≤ −1LN ≤ −1
2. Midslope drainages, shallow valleysSN ≤ −1−1 < LN < 1
3. Upland drainages, headwatersSN ≤ −1LN ≥ 1
4. U-shaped valleys−1 < SN < 1LN ≤ −1
5. Plains−1 < SN < 1−1 < LN < 1≤ 5°
6. Open slopes−1 < SN < 1−1 < LN < 1> 5°
7. Upper slopes, mesas−1 < SN < 1LN ≥ 1
8. Local ridges, hills in valleysSN ≥ 1LN ≤ −1
9. Midslope ridges, small hills in plainsSN ≥ 1−1 < LN < 1
10. Mountain tops, high ridgesSN ≥ 1LN ≥ 1

Slope enters only where both TPIs are near zero, to separate plains from open slopes; everywhere else the two TPIs decide. The ten classes cover every combination of the two indices, so no cell is left unclassified, and since the classes do not overlap the order in which they are tested does not matter.

Standardized TPI maps at 500 and 2000 meters and a slope map of a canyon system feeding a landform map with ten colored classes, and a legend giving each class's small-neighborhood, large-neighborhood and slope rules: canyons and deeply incised streams, midslope drainages, upland drainages, U-shaped valleys, plains, open slopes, upper slopes and mesas, local ridges, midslope ridges, and mountain tops
The two standardized TPI rasters and slope combined into the ten landform classes. Sample criteria slightly modified from Weiss (2001); from the extension manual (Jenness 2006).

Nothing about the two-scale logic requires standardized units. It is perfectly reasonable to classify landforms from two raw TPI rasters, with both thresholds set in elevation units. Weiss used standard deviations, but they carry the drawback described above: identical shapes can be classified differently depending on the topography around them, so the same 20 m knoll might be a local ridge on a plain and an unremarkable bump in the mountains. Raw thresholds read every knoll of a given height the same way, wherever it is, and for many ecological questions that makes them the more defensible choice. The price is the one Weiss standardized to avoid: raw TPI values span a wider range in a large neighborhood than in a small one, so the two scales need their own thresholds, chosen for the landscape and the question. The Landform Classification tool lets each scale use its own TPI type, and a raw version of the ten-class system is a matter of duplicating the bundled one in the Classification System Builder and entering the thresholds in elevation units.

A worked landscape: the Yazoren Polje

Tağıl and Jenness (2008) applied the whole sequence to a 44 km² karst watershed around the Yazoren Polje in the Marmara region of Turkey, a closed limestone depression drained by a gorge and surrounded by volcanic plateaus. The DEM was a 20 m raster interpolated from 10 m contours, and the analysis area was the watershed plus a 500 m buffer, so that every cell inside the watershed had a full neighborhood. TPI was computed at six circular neighborhoods, 50, 100, 150, 200, 250 and 450 m, and each was classified into four slope-position classes: valley bottom below −1 standard deviation, hilltop above +1, and the rest split at a 6° slope into flat and mid-slope.

Of the six, the 100 m neighborhood did the best job of extracting the features the authors wanted, the terraces along the gorge and the small karst depressions. Those features were too small to be picked out by the larger neighborhoods, and the 50 m neighborhood tended to extract only their edges rather than the features themselves. For landforms, the 50 m and 450 m TPIs were combined with slope, again split at 6°, under Weiss's ten-class criteria. More than half of the area came out as open slopes, which the authors attribute to the several rivers that cut the basin. The polje floor itself was classified as a plain, passing abruptly to open slopes along its northern and southern edges, where the geologic map shows normal faults; and three erosional surfaces at different heights appeared as upper slopes and mesas.

The paper is equally clear about what the classification got wrong. Several closed karst depressions were classified as deeply incised streams and U-shaped valleys, because the rules have no way to distinguish a closed hollow from a valley that drains; their flat floors were plains and their rims open slopes. The terraces showed up as local ridges and midslope ridges, which is what they look like to a two-scale index. Narrow creeks crossing wide flats without forming a broader valley were not identified at all. These are worth remembering as the characteristic behaviors of the method rather than as errors in its application: TPI describes relative height, and landforms that are defined by drainage or by process have to be read from it with care.

Choosing the neighborhood, and the thresholds

There is no single correct neighborhood size or shape, and no single set of thresholds that works everywhere, because there is no single definition of a hill or a valley. The right choices depend on the phenomenon being modeled. A large predator such as a bear or a mountain lion may be aware of the terrain for several hundred meters around it, while a mouse may pay attention to only the nearest 5 to 10 m, so the two call for very different neighborhoods on the same landscape. The same goes for the thresholds: a 10 m rise can be a substantial ridge to a mouse and go unnoticed by a mountain goat, for which 100 m might be the better threshold, and a slope threshold of 5° is usually a judgment rather than a measurement, since there is seldom good information about the slope at which an animal starts to treat the ground as a hillside. An argument for 3° or 10° would be as reasonable unless something specific about the organism or process points to a particular value.

The neighborhood size has little to do with the resolution of the DEM, except at the extremes. The DEM has to be fine enough to describe the terrain inside the neighborhood, so a 10 m neighborhood on a 10 m DEM is meaningless, and a very large neighborhood on a very fine DEM means a great many cells in every neighborhood mean, which costs computing time. Between those limits, the neighborhood is set by the question, not by the data.

For shape, a circle is the most defensible general choice. It extends the same distance in every direction, and for wildlife it is the natural model of an animal's perceptual range: the area around it that it pays attention to. Squares and rectangles reach farther in some directions than others, and an annulus ignores the cells nearest the focal cell. An annulus makes sense when the question is specifically how local conditions compare with more distant ones, but a different shape needs a clear reason behind it.

In practice, the choice is made by trial and error, and nearly everyone who uses the index tries several neighborhoods and thresholds before settling on one. Some strategies make that process quicker and easier to defend:

A classification of hills and valleys with no question behind it is only an academic exercise: it needs to satisfy nobody's idea of a hill but the analyst's, and it is unlikely to be useful for anything else. The index earns its keep when the neighborhood and thresholds are tied to what matters to the organism or process under study.

The six tools at a glance

Four of the tools are geoprocessing tools; the other two are windows, one for authoring the classification systems the others apply and one for trying neighborhoods and thresholds before running them.

ToolWhat it does
Topographic Position Index Computes TPI from a DEM over a circular or annular neighborhood, in any of the five forms above, as floating-point rasters that can be used directly or handed to the classification tools.
Slope Position Classification Classifies one TPI plus slope into slope-position classes using a saved classification system, computing the TPI and slope from the DEM on the fly or taking rasters you already have. Bundled systems: a six-class system adapted from Weiss (2001) in standardized, raw and percentile forms, Dickson and Beier four-class, Corridor Designer four-class, and Land Facet Corridor Designer three-class.
Landform Classification Classifies a small- and a large-neighborhood TPI plus slope into landform classes, again on the fly or from existing rasters. Bundled system: a ten-class system adapted from Weiss (2001).
General Raster Classification Applies a saved system to any single raster, in raw or whole-raster standardized units: the same machinery as the two tools above, without the terrain.
Classification System Builder Creates, edits, duplicates and deletes the classification systems: the classes, their thresholds and units, their names and colors. Systems are saved as JSON files in a per-user folder that survives reinstalling the add-in, and can be shared by copying the files.
TPI Neighborhood Sampler Takes a snapshot of the DEM in the map view and, as two sliders move, paints the TPI for any circular neighborhood and draws any threshold as a line, with a pinned cell's TPI plotted against the radius: a way to find the neighborhood and threshold that classify a known feature the way you want before running the tools. Raw and neighborhood standard deviation scales.

The tools descend from the Topographic Position Index extension for ArcView 3.x (Jenness 2006), which automated Weiss's methods and introduced saved, shareable criteria sets, and from the TPI tools of the Land Facet Corridor Designer for ArcMap (Jenness, Brost and Beier 2013), which offered the raw index, the neighborhood-standardized form and the whole-raster standardized form, and fixed three-, four- and six-category topographic position tools. The Pro tools replace the fixed category tools with classification systems that carry their own names, colors and units, and compute every neighborhood without Spatial Analyst.

Credits and references

By Jeff Jenness, Jenness Enterprises (www.jennessent.com). The TPI method and the slope-position and landform classifications are the work of Andrew Weiss of The Nature Conservancy; the extension that first automated them was suggested and partly funded by Joyce Miller of the National Oceanic and Atmospheric Administration. The profile and map figures on this page are from the extension manual.