﻿ TRI Comparison

# Comparison of TRI with Various Programs

Discussion of Roughness

 Algorithm Options Compute at edges of grid Geographic grids All output pixel-is-area Notes Reference MICRODEM Normalize distances No Correct No GRASS neighborhood size, exponent No Yes The index represents the mean change in elevation between a grid cell and its neighbours, over a user-specified moving window size. The original calculation in Riley et al. (1999) used only a 3x3 neighbourhood and represented the sum of the absolute deviations between the center pixel and its immediate 8 neighbours. In r.tri, this calculation is modified so that the calculation can be extended over any scale by taking the mean of the absolute deviations. r.tri produces fairly similar results to the average deviation of elevation values, apart from the center pixel is used in place of the mean. In practice, this produces a slightly less smoothed result that can potentially highlight finer-scale terrain features. However, because the terrain ruggedness index does not consider the distance of each cell from the centre cell in it's calculation, the TRI results can become noisy with large window sizes. To avoid this, weighting each cell by the inverse of its distance can be used by setting the exponent parameter to > 0. https://grass.osgeo.org/grass78/manuals/addons/r.tri.html GDAL, Riley None Optional Single conversion Yes This algorithm uses the square root of the sum of the square of the difference between a central pixel and its surrounding cells. This is recommended for terrestrial use cases. https://gdal.org/programs/gdaldem.html GDAL, Wilson None Optional Single conversion Yes algorithm uses the mean difference between a central pixel and its surrounding cells. This is recommended for bathymetric use cases. https://gdal.org/programs/gdaldem.html Whitebox Tools None Yes Single conversion No The terrain ruggedness index (TRI) is a measure of local topographic relief. The TRI calculates the root-mean-square-deviation (RMSD) for each grid cell in a digital elevation model (DEM), calculating the residuals (i.e. elevation differences) between a grid cell and its eight neighbours. Notice that, unlike the output of this tool, the original Riley et al. (1999) TRI did not normalize for the number of cells in the local window (i.e. it is a root-square-deviation only). However, using the mean has the advantage of allowing for the varying number of neighbouring cells along the grid edges and in areas bordering NoData cells. This modification does however imply that the output of this tool cannot be directly compared with the index ranges of level to extremely rugged terrain provided in Riley et al. (1999) https://www.whiteboxgeo.com/manual/wbt_book/available_tools/geomorphometric_analysis.html#RuggednessIndex SAGA 8.2.1 Standardize, min, max radii, weighting choices Yes Topographic Position Index (TPI) calculation as proposed by Guisan et al. (1999). This is literally the same as the difference to the mean calculation (residual analysis) proposed by Wilson & Gallant (2000). The bandwidth parameter for distance weighting is given as percentage of the (outer) radius. https://saga-gis.sourceforge.io/saga_tool_doc/8.2.1/ta_morphometry_16.html

## Case 1.  30 UTM DEM, Italian Alps--this is preliminary and all results subject to change

The 30 m DEM compares with the 1 sec DEM, which has actual spacing of 21.5 m x 30.9m.  The average slope for the UTM grid is 56.14%, while for the arc second it is 57.45%.  This is because the arc second grid slope is computed over an average distance of 26.2 m, and over shorter grid spacing slope increases (Guth and Kane, 2021).  Guth and Kane also showed that the overall statistics for elevation, slope, and aspect are very similar for a 1 sec and 26.2 m UTM DEM at this latitude.  You cannot compare individual points in a UTM and an arc second grid, because at some points they are at the same point, and at others are up to half the grid spacing apart.

The values computed by the various programs for TRI do not agree, except for Microdem and WhiteBox (small difference probably because Whitebox computes on the edges where points do not have eight neighbors), and Grass/GDAL Wilson which appear to use the same forumlas.

MICRODEM can create this on the Advanced Tab of the Raster GIS, Geomorphometry analysis.

## Moment report

 DEM MD TRI norm MD TRI grass TRI gdal TRI Riley gdal TRI Wilson WB TRI TRI n 132660 132686 132682 132689 132682 134226 TRI mean 11.1 15.47 13.51 43.76 13.51 15.44 TRI avg dev 5.03 5.32 4.76 15.05 4.76 5.33 TRI std dev 6.31 6.81 6.07 19.28 6.07 6.82 TRI skewness 0.7458 0.2061 0.2084 0.2059 0.2084 0.2137 TRI kurtosis 1.0301 0.6714 0.5922 0.6712 0.5922 0.6741 TRI min 0.01 0.01 0.01 0.01 0.01 0.01 TRI max 61.71 63.14 56.41 178.6 56.41 63.14 TRI median 10.38 15.78 13.78 44.64 13.78 15.75

Despite the differences in the values, all the TRI results correlate highly except for the MICRODEM normalized by distance (which are probably better numbers).

## Correlation Matrix

 DEM/Grid MD TRI norm MD TRI grass TRI gdal TRI Riley gdal TRI Wilson WB TRI MD TRI norm 1 0.7965 0.7957 0.7965 0.7957 0.7965 MD TRI 0.7965 1 0.9958 1 0.9958 1 grass TRI 0.7957 0.9958 1 0.9958 1 0.9958 gdal TRI Riley 0.7965 1 0.9958 1 0.9958 1 gdal TRI Wilson 0.7957 0.9958 1 0.9958 1 0.9958 WB TRI 0.7965 1 0.9958 1 0.9958 1

Highly correlated measures do not add much new information.  This tells us if the different programs compute the same thing even if there are differences in the scaling, and for instance that TRI and slope are really the same thing.

Correlation Matrix for elevation, slope, TRI, and TPI

 DEM/Grid MD TRI norm MD TPI norm MD TRI MD TPI N8E Slope percent Rugosity (m per 30m) std 3x3 grass TRI gdal TRI Riley gdal TRI Wilson gdal TPI WB TRI saga tri saga tpi 1.0000 0.2356 0.0740 0.2375 0.0752 0.2371 0.2617 0.1202 0.2379 0.2375 0.2379 0.0752 0.2336 0.2334 0.1285 MD TRI norm 0.2356 1.0000 0.0197 0.9990 0.0201 0.9799 0.9459 0.3750 0.9956 0.9990 0.9956 0.0201 0.9990 0.9990 0.0416 MD TPI norm 0.0740 0.0197 1.0000 0.0199 0.9996 0.0285 0.0117 0.0001 0.0196 0.0199 0.0196 0.9996 0.0199 0.0199 0.8691 MD TRI 0.2375 0.9990 0.0199 1.0000 0.0203 0.9799 0.9459 0.3760 0.9958 1.0000 0.9958 0.0203 1.0000 1.0000 0.0423 MD TPI 0.0752 0.0201 0.9996 0.0203 1.0000 0.0288 0.0120 0.0002 0.0201 0.0203 0.0201 1.0000 0.0203 0.0203 0.8753 N8E Slope percent 0.2371 0.9799 0.0285 0.9799 0.0288 1.0000 0.9305 0.2874 0.9818 0.9799 0.9818 0.0288 0.9799 0.9799 0.0455 Rugosity (m per 30m) 0.2617 0.9459 0.0117 0.9459 0.0120 0.9305 1.0000 0.3382 0.9504 0.9459 0.9504 0.0120 0.9459 0.9459 0.0309 std 3x3 0.1202 0.3750 0.0001 0.3760 0.0002 0.2874 0.3382 1.0000 0.3408 0.3760 0.3408 0.0002 0.3760 0.3760 0.0169 grass TRI 0.2379 0.9956 0.0196 0.9958 0.0201 0.9818 0.9504 0.3408 1.0000 0.9958 1.0000 0.0201 0.9958 0.9958 0.0419 gdal TRI Riley 0.2375 0.9990 0.0199 1.0000 0.0203 0.9799 0.9459 0.3760 0.9958 1.0000 0.9958 0.0203 1.0000 1.0000 0.0423 gdal TRI Wilson 0.2379 0.9956 0.0196 0.9958 0.0201 0.9818 0.9504 0.3408 1.0000 0.9958 1.0000 0.0201 0.9958 0.9958 0.0419 gdal TPI 0.0752 0.0201 0.9996 0.0203 1.0000 0.0288 0.0120 0.0002 0.0201 0.0203 0.0201 1.0000 0.0203 0.0203 0.8753 WB TRI 0.2336 0.9990 0.0199 1.0000 0.0203 0.9799 0.9459 0.3760 0.9958 1.0000 0.9958 0.0203 1.0000 1.0000 0.0420 saga tri 0.2334 0.9990 0.0199 1.0000 0.0203 0.9799 0.9459 0.3760 0.9958 1.0000 0.9958 0.0203 1.0000 1.0000 0.0417 saga tpi 0.1285 0.0416 0.8691 0.0423 0.8753 0.0455 0.0309 0.0169 0.0419 0.0423 0.0419 0.8753 0.0420 0.0417 1.0000

Last revision 2/5/2023