Patch simplification and “clumping”

Patch Simplification and Identifying Separate “Clumps”

The process of querying or classifying grids often leads to isolated small patches of cells and highly irregular boundaries around groups of cells of the same category. The “precision” of their boundaries may outweigh their utility as identifiers of hazard, suitability, or condition. When the map contains “clumps” of different type next to each other in a filled raster, the easiest way to eliminate these two conditions is to use a “median” or “mode” filter (see “filter” in next notes section). This page shows other methods that are helpful when patches are isolated.

Growing and shrinking

This process simplifies a patch of grid cells or a vector polygon by alternately expanding then shrinking the size of the cell groups or vector polygons (or by shrinking then expanding). For grids, adding one cell around the perimeter of all cell groups and then trimming one has the effect of smooth the boundaries because small embayments are eliminated. See the explanation for Expand, Shrink, and BoundaryClean in the ArcGIS Pro help website for details. In vector space, growing first and then shrinking by the same distance perpendicular to the boundary looks like this.

This is grow first then shrink. What would shrink then grow do? Do you want to fill the embayments or erode the peninsulas?

In Raster Space
These “clumps” are available as a raster file called “clump” ../demo/clumps/clump_this project. They should really be “patches” because that’s what more of the GIS folks call them, a minority call them “clumps.” These patches were made using the query “elevation > 1200 & slope < 40” from the demo/topo project.

What happens when you “expand” by two cells, then “shrink” vs shrinking first then expanding?

These maps show a grow-shrink done once using the BoundaryClean tool with the “ONE_WAY” option (from the commnad line variable “number_of_runs” or the check box on the tool), which is not the default. Not that there are many ways to sort the patches, by value or by patch size, small to large or large to small. In this case we only have one value, so it wouldn’t matter which sorting routine is used.

Here is the same command, but with ” TWO_WAY” option (runs twice, but the second time through it reverses the grow-shrink to shrink-grow. This eliminates the small islands and peninsulas.)

The other request available in ArcGIS is “Nibble,” which you can explore on your own. It is more complicated in is execution and effect (I use it to fill holes in geologic rasters in my own work).

Grouping contiguous cells into individually identified regions

This process allows us to identify contiguous cells as unique patches. This would be important for selecting individual patches in an analyses such as assigning hazard or suitability. In ArcGIS, this process works on grids where the cells to be “clumped” share a common value, and the rest of the cells have “No Data.” You can also choose whether of not diagonals count as “contiguous” and whether to save the original value in a “link” field or not. See the RegionGroup tool help page.