Show Navigation | Hide Navigation
You are here:
Extensions > Spatial Analyst > Analysis concepts > Generalization

Working on zones

Release 9.3
Last modified January 13, 2012
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Generalization"


Related Topics

Note: This topic was updated for 9.3.1.

There are two main types of generalization functions: those that work on (generalize) the zones, which include Region Group, and those that apply to (smooth) the zone edges. The following functions generalize zones: Nibble, Shrink, Expand, and Thin.


Nibble

The Nibble function allows selected areas of a raster to be assigned the value of their nearest neighbor. This is useful for editing areas of a raster where the data is known to be erroneous.

First, the algorithm determines all areas from the mask raster with the value NoData. The corresponding areas on the input raster will be nibbled. Second, an internal Euclidean allocation is performed to allocate values to the masked cells based on Euclidean distance.

The value of the cells from the input raster that correspond to the cells of NoData from the mask raster are nibbled and replaced by the value of the nearest neighbor according to Euclidean distance.

In the following image, Nibble was applied to the input and mask rasters. Nibble will only be applied to the NoData values in the mask raster. Notice all non-NoData cells on the mask raster receive the value from the input raster. These cell values and their locations will be used to assign values to the NoData locations identified on the mask raster. The NoData locations will receive the value of the cell in the input raster that is identified as the closest non-NoData cell on the mask raster.

Nibble example


Shrink

The Shrink function 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 (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 function. 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 two cells wide and ten cells long will be removed since it will shrink by one cell from two different directions. If you shrink by two 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 function 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 shrinking.

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 zone 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 zones 4 and 6


Expand


As the name implies, with the Expand function, 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.

When two foreground zones compete to expand into the same background zone, the conflict is resolved based on the value of the majority of surrounding cells.

NoData cells are always considered background cells; therefore, neighboring cells of any value can expand into NoData cells. NoData cells will never expand into their neighbors.

In the image below, the Expand function is applied to the input raster with zone 5 expanding one cell. Notice that Zone 5 expanded into the NoData values in the lower right.
Expand zone 5 by one


Thin

Thin reduces the number of cells used to represent raster linear features. Consider a scanned map of elevation contours. Because of the resolution of the scanner and width of the contours on the original map, the contours are represented in a raster as linear features from five to ten cells wide. After running Thin, each contour will be represented as a linear feature one cell wide.

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.