Records for each cell in the output, the identity of the connected region to which it belongs.
[Visual Basic .NET] Public Function RegionGroup ( _ ByVal Raster As IGeoDataset, _ ByVal useDiagonalNeighbors As Boolean, _ ByVal withinZones As Boolean, _ ByVal createLinkField As Boolean, _ [ByRef excludedValue As Object] _ ) As IGeoDataset
[C#] public IGeoDataset RegionGroup ( IGeoDataset Raster, bool useDiagonalNeighbors, bool withinZones, bool createLinkField, ref object excludedValue );
Optional Values
[C++]
HRESULT RegionGroup(
IGeoDataset* Raster,
VARIANT_BOOL useDiagonalNeighbors,
VARIANT_BOOL withinZones,
VARIANT_BOOL createLinkField,
VARIANT* excludedValue,
IGeoDataset** RegionGroup
);
[C++]Parameters
Raster [in]Raster is a parameter of type IGeoDataset
useDiagonalNeighbors [in] useDiagonalNeighbors is a parameter of type VARIANT_BOOL withinZones [in] withinZones is a parameter of type VARIANT_BOOL createLinkField [in] createLinkField is a parameter of type VARIANT_BOOL excludedValue [optional] excludedValue is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
RegionGroup [out, retval]RegionGroup is a parameter of type IGeoDataset
Product Availability
Remarks
raster |
An input Raster, RasterDataset, RasterBand, or RasterDescriptor whose cells define the zone values to be regrouped |
useDiagonalNeighbors |
Defines the manner in which to evaluate connectivity between cells If True, the connectivity between cells of the same value if they are within the immediate eight-cell neighborhood (eight nearest neighbors) of each other will be used. This includes if they are to the right or left, above or below, or are diagonal to each other. If False, the connectivity between cells of the same value only if the cells are directly to the right or left, or above or below each other—the four nearest neighbors will be used. If two cells with the same value are diagonal from one another, they are not considered connected |
withinZones |
Defines the requirement of which cell values should be considered when testing for connectivity If True, will test for the connectivity between input values that are the same within the same zone. The only cells that can be grouped are cells from the same zone (the same value) and that meet the spatial requirements of connectivity specified by useDiagonalNeighbors Boolean. If False, will test the connectivity by the spatial requirements specified by the useDiagonalNeighbors Boolean between cells with any values except for the excluded value identified by the argument excludedValue if one is specified. A value for the excludedValue argument must be input when withinZones Boolean is False. |
createLinkField |
Defines if a Link item is added to the value attribute table of the output Raster If True, an item Link will be added to the table of the output Raster. The Link item stores the original values for each newly created zone (created from disconnected regions) from the input Raster before they were regrouped. If False, the table for the output Raster will only contain the items Value and Count. |
[excludedValue] |
Identifies a value such that if a cell location contains the value, no spatial connectivity will be evaluated no matter what the Boolean is for the useDiagonalNeighbors Cells with the excluded value will be treated as NoData and are eliminated from calculations. Cell locations that contain an excluded value will receive zero for the location on the output Raster. The excluded value is similar to the concept of a background value or setting a mask for a single function with the Options dialog. It is particularly useful in conjunction with a False value for within Zones. |
- The method returns a reference to a Raster object.
- Read the Working with ArcGIS Spatial Analyst objects technical document for general information on implementing Spatial Analyst operations.