Clump

This tool re-categorizes data in a raster image by grouping cells that form physically discrete, connected areas into unique categories. Essentially this will produce a patch map from an input categorical image. The input image should either be Boolean (1's and 0's) or categorical. The input image could be created using the Reclass tool or one of the comparison operators (GreaterThan, LessThan, GreaterThanEqualTo, LessThanEqualTo, EqualTo, NotEqualTo). Check the 'Treat zeros as background cells' checkbox if you would like to only assigned contiguous groups of non-zero values in the input image unique identifiers.

See Also:

Scripting:

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

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.dep"
outputFile = wd + "output.dep"
includeDiagonals = "true"
zeroBackground = "false"
args = [inputFile, outputFile, includeDiagonals, zeroBackground]
pluginHost.runPlugin("Clump", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "input.dep"
def outputFile = wd + "output.dep"
def includeDiagonals = "true"
def zeroBackground = "false"
String[] args = [inputFile, outputFile, includeDiagonals, zeroBackground]
pluginHost.runPlugin("Clump", args, false)

Credits: