This tool calculates the percentage of a raster stack that have cell values greater than an input. The user must specify the name of the value raster, the names of the raster files contained in the stack (i.e. group of images), and an output raster file name. The tool, working on a cell-by-cell basis, will count the number of rasters within the stack that have a higher cell value as the corresponding grid cell in the Value raster. This count is then expressed as a percentage of the number of rasters contained within the stack and output. If any of the rasters within the stack contain the NoData value, the corresponding grid cell in the output raster will be assigned NoData.
The following is an example of a Python script using this tool:
wd = pluginHost.getWorkingDirectory()
valueRaster = wd + "value.dep"
# You may have multiple input files but they must
# be separated by semicolons in the string.
inputFiles = wd + "input1.dep" + ";" + wd + "input2.dep" + ";" + wd + "input3.dep"
outputFile = wd + "output.dep"
args = [valueRaster, inputFiles, outputFile]
pluginHost.runPlugin("PercentGreaterThan", args, False)
This is a Groovy script also using this tool:
def wd = pluginHost.getWorkingDirectory()
def valueRaster = wd + "value.dep"
// You may have multiple input files but they must
// be separated by semicolons in the string.
def inputFiles = wd + "input1.dep" + ";" + wd + "input2.dep" + ";" + wd + "input3.dep"
def outputFile = wd + "output.dep"
String[] args = [valueRaster, inputFiles, outputFile]
pluginHost.runPlugin("PercentGreaterThan", args, false)