This document is archived and information here might be outdated.  Recommended version.


IRasterNeighborhood.SetIrregular Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoAnalyst)  

IRasterNeighborhood.SetIrregular Method

Sets a neighborhood object each of whose entries can be turned on or off.

[Visual Basic .NET]
Public Sub SetIrregular ( _
    ByVal height As Integer, _
    ByVal width As Integer, _
    ByRef entryValues As Object _
)
[C#]
public void SetIrregular (
    int height,
    int width,
    ref object entryValues
);
[C++]
HRESULT SetIrregular(
  long height,
  long width,
  VARIANT* entryValues
);
[C++]

Parameters height [in] height is a parameter of type long width [in] width is a parameter of type long entryValues [in] entryValues is a parameter of type VARIANT

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

height

the number of cells in the y-direction of the neighborhood

width

the number of cells in the x-direction of the neighborhood

entryValues

an array that defines the irregular shaped neighborhood by using 0 and 1 values to designate cell to include in the neighborhood.   A value of "0" for a cell position indicates that the cell is not a member of the neighborhood; a value of "1" for a cell position indicates that its corresponding cell (and value) is a member of the neighborhood and will be used in the neighborhood calculation.

An example of a [3 x 5] irregular shaped neighborhood may look like the following. 

1 0 1 0 1
0 1 0 1 0
1 0 1 0 1

 

For specifying an irregularly shaped neighborhood around the processing cell. The kernel specifies which cell positions should be included within the neighborhood.  The values in the kernel should be either '0' or '1' (any value not equal to '0' will be interpreted as '1').  A value of '0' for a cell position indicates that the cell is not a member of the neighborhood; a value of '1' for a cell position indicates that its corresponding cell (and value) is a member of the neighborhood.  Only cells that are identified as a member will be included in the neighborhood calculations.

See Also

IRasterNeighborhood Interface