This document is archived and information here might be outdated. Recommended version. |
Sets a rectangle neighborhood object.
[Visual Basic .NET] Public Sub SetRectangle ( _ ByVal width As Double, _ ByVal height As Double, _ ByVal unitsType As esriGeoAnalysisUnitsEnum _ )
[C#] public void SetRectangle ( double width, double height, esriGeoAnalysisUnitsEnum unitsType );
[C++]
HRESULT SetRectangle(
double width,
double height,
esriGeoAnalysisUnitsEnum unitsType
);
[C++] Parameters width [in]
width is a parameter of type double height [in]
height is a parameter of type double unitsType [in]
unitsType is a parameter of type esriGeoAnalysisUnitsEnum
width |
the number of units in the x-direction that the neighborhood will encompass. |
height |
the number of units in the y-direction that the neighborhood will encompass. |
unitsType |
An esriGeoAnalysisUnitsEnum defining the type of units to calculate the neighborhood. esriUnitsMap - neghbourhood is identified by map units (i.e., meters, feet) |
Defines the shape of a neighborhood and to be a rectangle. The x,y position for the processing cell within the neighborhood, with respect to the upper-left corner of the neighborhood, is determined by the following equations:
x = (width of the neighborhood + 1)/2
y = (height of the neighborhood + 1)/2
If the input number of cells is even, the x- and y-coordinates are computed using truncation.
For example, in a 5-x-5 cell neighborhood the x- and y-values are 3, 3. In a 4-x-4 neighborhood the x- and y-values are 2, 2.