Generalizing zones with Expand and Shrink

Available with ArcGIS Image for ArcGIS Online.

You can use the Expand and Shrink tools to generalize, or simplify, rasters. In contrast to the Majority Filter and Boundary Clean tools, Expand and Shrink allow you to target the generalization to a particular zone or zones.In contrast to Boundary Clean, the Expand and Shrink tools allow you to target the generalization to a particular zone or zones. Depending on the tool you use, you can make particular zones larger or smaller. You can also control the amount of generalization that will occur.

Both tools have two methods to from which to choose. The first is a mathematical morphological approach. The other is a distance-based approach.

Comparing Expand and Shrink

Both tools operate by allowing certain zones to replace cells of other zones.

Expand

With the Expand tool, the selected zones increase in size by expanding into other zones. Conceptually, the selected Zone Values can be viewed as foreground zones, while the other values remain background zones. The foreground zones can expand into the background zones.

Shrink

With the Shrink tool, the selected zones shrink, or reduce in size, by cells from other zones expand into them. Conceptually, the selected Zone Values are considered to be foreground zones, while the remaining zone values are considered to be background zones. With this tool, cells in the foreground zones are allowed to be replaced by cells in the background zones.

Thin islands inside a zone, which can be viewed as sharing boundaries with the zone, may also be replaced

Amount of generalization

The amount of generalization can be controlled with the Number of Cells parameter. By default, this value is 1, which means that depending on which tool is being used, the selected zones will expand or shrink by the amount corresponding to one cell's size. To increase the degree of generalization, you can specify a larger value for this parameter. Conceptually, this is like running the tool as many times as the number specified, with the results of the previous run being the input into the subsequent iteration

Method

A distance-based method is used when generalizing rasters with the Expand and Shrink.

Distance-based

The distance-based approach supposes that cells with a selected input zone value or values are sources. Each cell in the input raster is considered in relation to its distance to the nearest source cell. The distance is limited to the Euclidean distance in integer multiples of the input raster's cell resolution.

The following conditions are evaluated to determine what the final output value that any particular cell within this distance will be. While descriptions are for the Expand tool, the same principles apply to the Shrink tool.

  • If a cell can only find one type of zone source cell within the range of allowed distance, that cell will be expanded into with that zone value.
  • If a cell has several types of zone values within the allowed distance, the cell will be expanded into by the value of the zone that is the nearest.
  • If a cell has several types of source cells within the allowed distance, and there are two or more source cells with the same distance (a tie), the algorithm will first count the contribution of each of the source zones. The zone with the most overall contribution will be used as the output value for that cell.
  • If a tie still remains, this means that there are two or more source zones that are both nearest and have equal contributions. In this case, the cell will be expanded into by the source with the smallest cell value.

References

Matheron, G., Elements pour une Theorie del Milieux Poreux, Masson, Paris, 1967

Serra, J. Image Analysis and Mathematical Morphology, Academic Press, London 1982