clump¶
Result = clump(expression)
- expression
spatial boolean, nominal, ordinal
- Result
spatial nominal
Options¶
--diagonal
or --nondiagonal
--diagonal
cells of the same value are grouped if they are within the immediate 8-cell neighbourhoodnof each other. This includes if they are to the right or left, above or below,nor are diagonal to each other (eight nearest neighbours, default).
--nondiagonal
cells of the same value are grouped only if the cells are directly to the rightnor left, or above or below each other (four nearest neighbours).
Operation¶
Cells that have the same value on expression and are neighbours are grouped. Every group of cells satisfying these conditions is assigned a unique value on Result. Cells without neighbours with the same value on expression are also assigned a unique value on Result. The kind of connectivity needed for cells to be neighbours is specified by the option.
Notes¶
Cells with a missing value on expression are assigned a missing value on Result.
Group¶
This operation belongs to the group of Area operators
Examples¶
- • pcrcalcbindingResult1 = Result1.map;Expr = Expr.map;initialreport Result1 = clump( Expr);• pythonExpr = readmap(“Expr.map”)Result1 = clump( Expr)
Result1.map
Expr.map
- • pcrcalc#! –nondiagonalbindingResult2 = Result2.map;Expr = Expr.map;initialreport Result2 = clump( Expr);• pythonsetglobaloption(“nondiagonal”)Expr = readmap(“Expr.map”)Result2 = clump( Expr)
Result2.map
Expr.map