This tool re-categorizes data in a raster image by grouping cells that form discrete, contiguous areas into unique categories. Essentially this will produce a patch map from an input categorical raster, assigning each feature unique identifiers. The input raster should either be Boolean (1's and 0's) or categorical. The input raster could be created using the reclass tool or one of the comparison operators (`GreaterThan`, `LessThan`, `EqualTo`, `NotEqualTo`). Use the treat zeros as background cells options (`zero_back`) if you would like to only assigned contiguous groups of non-zero values in the raster unique identifiers. Additionally, inter-cell connectivity can optionally include diagonally neighbouring cells if the `diag` flag is specified.

## See Also

reclass, `GreaterThan`, `LessThan`, `EqualTo`, `NotEqualTo`

## Function Signature

`def clump(self, raster: Raster, diag: bool = False, zero_background: bool = False) -> Raster: ...`

## Project Links

WbW Homepage User Manual Support WbW