Calculate the Getis-Ord statistic and Coefficient of Variation with a configurable window size. Importantly, this code uses the Gi* variation of the Getis-Ord statistic, which is suggested for use in remote sensing (the statistic built-in to ENVI runs the Gi method instead).

ROIs in ENVI are very useful, but there are some things that ENVI doesn't let you do. That's where RTWTools comes in: you can shrink and grow ROIs (particularly useful for removing adjacency effects), translate them (in x and y directions) and calculate statistics over all the pixels within them. The latter function allows far more detailed statistics than ENVI provides by default, including summing all the pixels in an ROI (particularly useful when combined with the surface area tools below).

Normally when calculating the surface area of a feature from a DEM or satellite image we simply sum the nominal surface area of the pixels covering it. However, this can give incorrect results as, for example, a large hemispherical hill has a much larger surface area than a flat area of the same size. These functions allow estimation of the 3D surface area from a DEM, plus calculation of the 3D:2D surface area ratio (which is a measure of topographic roughness).

RTWTools provides a tool which extends the *Band Threshold to ROI* tool to do a percentile threshold, thus allowing ROIs to be created using criteria such as the top 5% of pixels in a band (particularly useful when applied to Getis images to select uniform areas). There is also a tool available for creating GLT images for further processing in ATCOR and AZGCORR