Working with ArcGIS Pro? You should listen to our podcast!
The Topographic Wetness Index (TWI) is a valuable tool for hydrologists, environmental scientists, and geographers. It quantifies the topographic control on hydrological processes, providing insights into areas that are likely to be wetter due to their landscape position. This guide walks through the process of calculating the TWI using ArcGIS Pro.
Prerequisites
- ArcGIS Pro software installed.
- A Digital Elevation Model (DEM) of your study area.
Step 1: Prepare Your Workspace
- Launch ArcGIS Pro and open a new or existing project.
- Import your DEM into the project.
Step 2: Fill the DEM
Before calculating the TWI, it is essential to fill any sinks or spurious depressions in the DEM. These local low points trap flow and prevent a continuous flow network from being derived, which would produce incorrect flow direction and accumulation results.
- Navigate to the Geoprocessing pane.
- Search for the Fill tool and select it.
- Input your DEM into the Input Surface Raster field.
- Run the tool.
Step 3: Calculate Flow Direction
This step determines the direction of flow for each cell in the DEM.
- Search for the Flow Direction tool in the Geoprocessing pane.
- Use the filled DEM from the previous step as the input.
- Execute the tool.
Step 4: Compute Flow Accumulation
Flow accumulation calculates the number of upstream cells that contribute flow to each cell in the DEM.
- Find the Flow Accumulation tool.
- Input the flow direction raster from the previous step.
- Run the tool.
Step 5: Determine Slope
The Slope tool calculates the maximum rate of change in elevation between each cell and its neighbours.
- Search for the Slope tool.
- Use the filled DEM as the input raster.
- Ensure the output measurement is set to DEGREE.
- Execute the tool.
Step 6: Convert Slope to Radians
The TWI formula requires slope values in radians, not degrees.
- Use the Raster Calculator tool.
- Convert the slope from degrees to radians using the formula:
slope_radians = slope_degrees * (π / 180)
Step 7: Calculate the Tangent of the Slope
- Again, use the Raster Calculator.
- Compute the tangent of the slope in radians:
tan_slope = tan(slope_radians)
Step 8: Adjust Flow Accumulation
- In the Raster Calculator, convert flow accumulation into specific catchment area and add one cell to avoid a division-by-zero error in flat areas. Multiply by your DEM’s cell size so the value is a true area rather than a raw cell count:
adjusted_flow_accumulation = (flow_accumulation + 1) * cell_size(replacecell_sizewith your DEM resolution in metres, e.g. 10). Omitting the cell-size term still yields a usable relative wetness pattern, but the absolute TWI values will be offset and not comparable across DEMs of different resolution.
Step 9: Compute the Topographic Wetness Index (TWI)
- Use the Raster Calculator for this final calculation.
- The formula for TWI is:
TWI = ln(adjusted_flow_accumulation / tan_slope)
Step 10: Visualize and Interpret the TWI
- Add the TWI raster layer to your map.
- Use the Symbology pane to classify and colour the TWI values as required.
Conclusion
The Topographic Wetness Index is a powerful tool for understanding landscape hydrology. By following this step-by-step guide, you can efficiently compute the TWI for any region using ArcGIS Pro. Whether you are studying wetland habitats, planning infrastructure, or conducting environmental assessments, the TWI provides valuable insights into the wetness potential of the landscape.
Frequently asked questions about calculating the Topographic Wetness Index (TWI) in ArcGIS Pro
1. What is the Topographic Wetness Index (TWI)?
Answer: The Topographic Wetness Index (TWI) is a terrain attribute that estimates where water will accumulate across a landscape. It is a function of the upslope contributing area and the local slope. The formula is:
TWI = ln( a / tan(b) )
- a = upslope contributing area per unit contour length (m²/m)
- b = local slope in radians
2. Why is it necessary to fill the DEM before calculating the TWI?
Answer: DEMs often contain sinks — cells or groups of cells that are artificially lower than their surroundings due to interpolation errors or rounding in the source data. These sinks trap modelled water flow, breaking the continuous flow network required for accurate flow direction and flow accumulation results. The Fill tool removes these spurious depressions by raising their elevation to the level of the lowest outflow point, ensuring that water can flow continuously across the surface.
3. How does the Flow Direction tool work?
Answer: The Flow Direction tool analyses the elevation of each cell and its eight immediate neighbours to determine the direction of steepest descent. By default, ArcGIS Pro uses the D8 (deterministic eight-direction) method, in which each cell is assigned a single flow direction encoded as a power of two (1, 2, 4, 8, 16, 32, 64, or 128). The tool also supports the D-Infinity (DINF) and multiple flow direction (MFD) methods for more nuanced routing.
4. What is the significance of the Flow Accumulation step?
Answer: Flow Accumulation counts the number of upstream cells that drain into each cell, providing a proxy for the upslope contributing area. This value corresponds to a in the TWI formula. Cells with high flow accumulation values represent valleys or channels where water converges, while cells with low values represent ridges or hilltops.
5. Why do we need to convert the slope from degrees to radians?
Answer: The tangent function in the TWI formula requires the slope expressed in radians. ArcGIS Pro’s Slope tool outputs degrees by default, so conversion using the formula radians = degrees × (π / 180) is a necessary intermediate step.
6. How is the tangent of slope used in the TWI calculation?
Answer: The tangent of the slope represents the steepness of the terrain. In the TWI formula it acts as the denominator: steeper slopes produce a smaller TWI value (water drains away quickly), while gentle or flat slopes produce a larger TWI value (water tends to accumulate).
7. What does the final TWI value represent?
Answer: The TWI value for each cell indicates its relative wetness potential. Higher TWI values identify areas with a large upslope catchment and low gradient — such as valley floors and flat lowlands — where soil moisture and surface saturation are more likely. Lower values indicate steep, well-drained hillslope positions.
8. How can I visualize the TWI results effectively?
Answer: In ArcGIS Pro, apply a classified or stretched colour ramp in the Symbology pane — a sequential blue-to-yellow scheme works well to distinguish wet from dry positions. The TWI layer can also be draped over a hillshade in a 3D scene for a more intuitive view of how wetness relates to the terrain surface.
9. Can I use TWI for applications other than hydrology?
Answer: Yes. TWI is widely used beyond hydrological modelling. Common applications include wetland and riparian habitat delineation, soil moisture mapping, agricultural drainage planning, landslide susceptibility assessment, and infrastructure siting where soil saturation is a design concern.
10. Are there any limitations or considerations when calculating TWI in ArcGIS Pro?
Answer: The accuracy of the TWI depends directly on the quality and resolution of the input DEM. A coarser DEM will generalise terrain and reduce the precision of flow routing. The standard D8 flow direction method can also produce unrealistic parallel flow patterns on flat or gently sloping surfaces; in such cases, the D-Infinity or MFD methods available in ArcGIS Pro’s Flow Direction tool may give better results. Additionally, the cell size of the DEM should be accounted for when converting flow accumulation counts to a true upslope contributing area.



