My understanding of how topographic position index is calculated is:
TPI = cell value - (mean of cell values within defined neighborhood)
But, I see that Weiss' original poster (http://www.jennessent.com/downloads/tpi-poster-tnc_18x22.pdf) was a little bit different than this.
tpi = int((dem - focalmean(dem, annulus, irad, orad)) + .5)
This part is essentially what I described - (dem - focalmean(dem, annulus, irad, orad). The annualus, irad, and orad terms just allow for an annulus of a defined size to be used rather than a continuous neighborhood.
Why is the "+.5" included and the "int()"? Weiss stated, "This poster presents an algorithm, implemented in GRID." I'm not familiar with GRID, was "int()" a function to integer-ize a value?
SAGA cites Weiss' posted for the calculation of TPI, does that mean that the algorithm in SAGA uses the "int()" and "+.5"?