This tool performs a percentile filter on a raster digital elevation model (DEM). This tool differs from the Percentile Filter tool in that it is based on an image histogram, a data structure similar to an integral image. This allows for very computationally efficient calculation of elevation percentile with very large search windows. However, there are two cautions that must be made. First, the reported elevation percentile is only an estimate rather than an exact measure. The percentile filter will certainly provide more accurate measures but at the cost of being considerably more computationally inefficient for large search windows. The accuracy of the estimate improves as the number of histogram bins is increased and as local relief increases. Secondly, the memory required by this tool is quite large, which will undoubtedly pose a major limitation to its application with larger DEMs or on systems with constrained memory resources. This issue becomes increasingly problematic as the number of histogram bins increases.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
demFile = wd + "dem.dep"
outputFile = wd + "output.dep"
searchRadius = "100.0"
numBins = "16"
args = [demFile, outputFile, searchRadius, numBins]
pluginHost.runPlugin("ElevationPercentileImageHisto", args, False)
This is a Groovy script also using the tool:
def wd = pluginHost.getWorkingDirectory()
def demFile = wd + "dem.dep"
def outputFile = wd + "output.dep"
def searchRadius = "100.0"
def numBins = "16"
String[] args = [demFile, outputFile, searchRadius, numBins]
pluginHost.runPlugin("ElevationPercentileImageHisto", args, false)