Skip To Content

Region Group function

Available with Image Server

Records, for each cell in the output, the identity of the connected region to which that cell belongs. A unique number is assigned to each region.

This is a global raster function.

Notes

In general, the first region scanned receives the value one, the second two, and so on, until all regions are assigned a value. The scan moves from left to right, top to bottom. The values assigned to the output zones are based on when they are encountered in the scanning process.

There are two parameters that control how connectivity between regions is established. The Number of Neighbor Cells parameter determines the geometry of the connectivity, either as orthogonal (four way) only, or as diagonal as well as orthogonal (eight way). The Zone Connectivity parameter determines which cell values are considered when evaluating connectivity.

By default, the Add Link parameter setting is enabled. This will create a LINK field in the attribute table of the output raster, which retains the original zone value for each cell from the input raster. This parameter only applies when the Zone Connectivity parameter is set to Within. If it is set to Cross, the attribute table of the output raster will only contain the usual Value and Count fields.

When available, the LINK field allows you to trace the parentage of each newly created region back to the original input zone values, to be used for additional analysis.

Cell locations that contain the excluded value receive zero on the output so that these zones are not confused with existing NoData cell locations. Since the numbering begins with the value 1, the cells that are excluded from the regroup are considered background. These background cells can be reclassed or manipulated in the same way as any other value.

Parameters

Parameter nameDescription

Zone Raster

(Required)

The input raster for which unique connected regions of cells will be identified.

It must be of integer type.

Number of Neighbor Cells

Specifies the number of neighboring cells to use when evaluating connectivity between cells that define a region.

  • Four—Connectivity is evaluated for the four nearest (orthogonal) neighbors of each input cell. Only the cells with the same value that share at least one side will contribute to an individual region. If two cells with the same value are diagonal from one another, they are not considered connected. This is the default.

  • Eight—Connectivity is evaluated for the eight nearest neighbors (both orthogonal and diagonal) of each input cell. Cells with the same value that are connected either along a common edge or corner to each other will contribute to an individual region.

Zone Connectivity

Defines which cell values should be considered when testing for connectivity.

  • Within—Connectivity for a region is evaluated for input cells that are part of the same zone (cell value). The only cells that can be grouped are cells from the same zone that meet the spatial requirements of connectivity specified by the Number of Neighbor Cells parameter (four or eight). This is the default.

  • Cross—Connectivity for a region is evaluated between cells of any value, except for the zone cells identified to be excluded by the Excluded value parameter, and subject to the spatial requirements specified by the Number of Neighbor Cells parameter. Groupings of regions in the input that are separated from other groupings by a buffer of NoData cells will be processed independently from each other.

Add Link

Specifies whether a link field will be added to the table of the output when the Zone Connectivity parameter is set to Within. It is ignored if that parameter is set to Cross.

  • Add Link—A LINK field will be added to the table of the output raster. This field stores the value of the zone to which the cells of each region in the output belong, according to the connectivity rule defined in the Number of Neighbor Cells parameter. This is the default.

  • No Link—A LINK field will not be added. The attribute table for the output raster will only contain the Value and Count fields.

Excluded Value

A value that excludes all cells of that zone value from the connectivity evaluation. If a cell location contains the value, no spatial connectivity will be evaluated, regardless of how the number of neighbors is specified.

Cells with the excluded value will be treated in a similar way to NoData cells, and are eliminated from consideration in the operation. Input cells that contain the excluded value will receive 0 on the output raster. The excluded value is similar to the concept of a background value.

If a zone in the input raster has a value of 0, to have that zone be included in the operation, specify a value for this parameter that is not present in the input. For example, if an input raster has values of 0, 1, 2, and 3, specify an Excluded Value of 99. Otherwise, all cells of value 0 in the input will be 0 in the output, and will also not have their individual regions determined.


In this topic
  1. Notes
  2. Parameters