Set NoData value

This tool will re-assign a user-defined background value in an input raster image the NoData value. Most Whitebox GAT tools recognize NoData grid cells and treat them specially. NoData grid cells are also displayed differently. The user must input the name of one or more raster images to be updated and the current background value. The input images will be altered such that all grid cells containing the background value will be replaced with the NoData value. The default background value is zero, although any numeric value is possible.

See Also:

Scripting:

The following is an example of a Python script using this tool:

wd = pluginHost.getWorkingDirectory()
# You may have multiple input shapefiles but they must
# be separated by semicolons in the string.
inputFiles = wd + "input1.dep" + ";" + wd + "input2.dep"
backgroundValue = "0.0"
args = [inputFiles, backgroundValue]
pluginHost.runPlugin("SetNoData", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
// You may have multiple input shapefiles but they must
// be separated by semicolons in the string.
def inputFiles = wd + "input1.dep" + ";" + wd + "input2.dep"
def backgroundValue = "0.0"
String[] args = [inputFiles, backgroundValue]
pluginHost.runPlugin("SetNoData", args, false)

Credits: