ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Generalizing zones with Expand and Shrink

Available with Spatial Analyst license.

  • Expand
  • Shrink
  • References

The tools in the Generalization toolset that generalize zones include Expand and Shrink.

Expand

With the Expand tool, certain zones can expand into other zones. Conceptually, selected values can be viewed as foreground zones, while others remain background zones. The foreground zones can expand into the background zones.

In the image below, the Expand tool is applied to the input raster with zone 5 expanding one cell. Notice that zone 5 expands into the NoData values at the lower right.

Expand illustration
OutRas = Expand(InRas1, 1, [5])

Shrink

The Shrink tool shrinks specified zones by replacing them with the value of the cell that is most frequent in its neighborhood.

In Shrink, the values of spurious cells along zonal boundaries are changed to the value of their highest frequency neighbor. Any cells that are not internal cells (those that cannot be viewed as a center to eight nearest neighbors of the same value) may be replaced.

Thin islands inside a zone, which can be viewed as sharing boundaries with the zone, may also be replaced. You can control how many cells to shrink with the Shrink tool. When you shrink by one cell, the smallest size region that can be retained is a 3 by 3 block of cells (3 by 2 at an edge or 2 by 2 in a corner). Thin portions of regions can be replaced.

For example, a region that is 2 cells wide and 10 cells long will be removed, since it will shrink by 1 cell from two different directions. If you shrink by 2 cells, the smallest size region that can be retained is a 5 by 5 block of cells.

When you shrink by more than one cell, conceptually, it is like running the tool as many times as the number of cells to shrink with the results of the previous run being the input to the subsequent iteration.

For example, if you shrink by two cells, conceptually, it is like running Shrink by one cell on the input raster and shrinking the identified zones and using the output of the first shrink as the input for the second shrink.

In the image below, Shrink is applied to the input raster, so zone 5 shrinks by one cell. Zone 5 is no more than two cells wide in any area; therefore, all cells containing 5 are replaced with the value of highest frequency in its neighborhood. NoData invades two locations at the bottom right, since it is the value of highest frequency to the two locations.

Shrink illustration
OutRas = Shrink(InRas1, 1, [5])

In the image below, Shrink is applied to the input raster, so zones 4 and 6 shrink by one cell. In the upper left corner, a value 4 remains, since it is deeper than one cell.

Shrink illustration
OutRas = Shrink(InRas1, 1, [4,6])

References

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

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

Related topics

  • An overview of the Generalization toolset
  • Shrink
  • Expand

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal