r.tri calculates the Terrain Ruggedness Index (TRI) of Riley et al. (1999). 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 better highlight finer-scale terrain features.
Similar to many other GRASS GIS algorithms, cell padding is not performed automatically which will leave null values at the boundaries of the output raster relative to the size of the input raster. To minimize this effect the DEM needs to be buffered/grown prior to using r.tri.
To reduce computational times for large raster datasets, setting n_jobs > 1 will use a parallelized and tiled calculations that is spread across multiple processing cores. This option requires the GRASS addon r.mapcalc.tiled to be installed.
d.rast map=elev_lid792_1m@PERMANENT g.region raster=elev_lid792_1m@PERMANENT -a r.tri input=elev_lid792_1m@PERMANENT size=9 output=tri
© 2003-2020 GRASS Development Team, GRASS GIS 7.8.4dev Reference Manual