com.esri.arcgis.geoanalyst
Interface IRasterNeighborhood

All Superinterfaces:
Serializable
All Known Implementing Classes:
RasterNeighborhood

public interface IRasterNeighborhood
extends Serializable

Provides access to members that control the analytical region used when performing neighborhood analsis.

Superseded By

IRasterNeighborhood2

Remarks

  • Read the Working with ArcGIS Spatial Analyst objects technical document for general information on implementing Spatial Analyst operations.
  • Product Availability

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


    Method Summary
     void setAnnulus(double innerRadius, double outerRadius, int unitsType)
              Sets an annulus neighborhood object.
     void setCircle(double radius, int unitsType)
              Sets a circle neighborhood object.
     void setDefault()
              Sets a default neighborhood object.
     void setIrregular(int height, int width, Object entryValues)
              Sets a neighborhood object each of whose entries can be turned on or off.
     void setRectangle(double width, double height, int unitsType)
              Sets a rectangle neighborhood object.
     void setWedge(double radius, double startAngle, double endAngle, int unitsType)
              Sets a wedge neighborhood object.
     void setWeight(int height, int width, Object entryValues)
              Sets a neighborhood object each of whose entries can be assigned a weight.
     

    Method Detail

    setDefault

    void setDefault()
                    throws IOException,
                           AutomationException
    Sets a default neighborhood object.

    Remarks

    The default neighborhood is set to be rectangle - 3 by 3 cell units.

    Product Availability

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

    Supported Platforms

    Windows, Solaris, Linux

    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    setAnnulus

    void setAnnulus(double innerRadius,
                    double outerRadius,
                    int unitsType)
                    throws IOException,
                           AutomationException
    Sets an annulus neighborhood object.

    Remarks

    innerRadius

    specifies the radius of the inner circle of the annulus from the center of the processing cell.

    outerRadius

    specifies the radius of the outer circle of the annulus neighborhood from the center of the processing cell. The outer circle defines the extent of the neighboorhood.

    unitsType

    An esriGeoAnalysisUnitsEnum defining the type of units to calculate the neighborhood.
    The enumeration types are:

    esriUnitsMap - units are defined from the map (i.e., meters, feet)
    esriUnitsCells - neighbourhood is identified by number of cells

    The annulus shape comprises one smaller circle within a larger circle (a donut shape). Cells that fall outside the radius of the smaller circle but inside the radius of the larger circle will be included in the processing of the neighborhood.

    Product Availability

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

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    innerRadius - The innerRadius (in)
    outerRadius - The outerRadius (in)
    unitsType - A com.esri.arcgis.geoanalyst.esriGeoAnalysisUnitsEnum constant (in)
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    setCircle

    void setCircle(double radius,
                   int unitsType)
                   throws IOException,
                          AutomationException
    Sets a circle neighborhood object.

    Remarks

    radius

    Specifies the radius from the center of the processing cell that the circle neighborhood will span.

    unitsType

    An esriGeoAnalysisUnitsEnum defining the type of units to calculate the neighborhood.
    The enumeration types are:

    esriUnitsMap  - neghbourhood is identified by map units (i.e., meters, feet) 
    esriUnitsCells - neighbourhood is identified by number of cells

    The size of the circle depends on the specified radius. The radius is identified in cells or map units, measured perpendicular to the x- or y-axis. Any cell center encompassed by the circle will be included in the processing of the neighborhood.

    Product Availability

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

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    radius - The radius (in)
    unitsType - A com.esri.arcgis.geoanalyst.esriGeoAnalysisUnitsEnum constant (in)
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    setIrregular

    void setIrregular(int height,
                      int width,
                      Object entryValues)
                      throws IOException,
                             AutomationException
    Sets a neighborhood object each of whose entries can be turned on or off.

    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.

    Product Availability

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

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    height - The height (in)
    width - The width (in)
    entryValues - A Variant (in)
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    setRectangle

    void setRectangle(double width,
                      double height,
                      int unitsType)
                      throws IOException,
                             AutomationException
    Sets a rectangle neighborhood object.

    Remarks

    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.
    The enumeration types are:

    
    esriUnitsMap  - neghbourhood is identified by map units (i.e., meters, feet)
    esriUnitsCells - neighbourhood is identified by number of cells

    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.

    Product Availability

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

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    width - The width (in)
    height - The height (in)
    unitsType - A com.esri.arcgis.geoanalyst.esriGeoAnalysisUnitsEnum constant (in)
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    setWedge

    void setWedge(double radius,
                  double startAngle,
                  double endAngle,
                  int unitsType)
                  throws IOException,
                         AutomationException
    Sets a wedge neighborhood object.

    Remarks

    radius

    the radius distance value for the wedge neighborhood. The radius is identified in cells measured perpendicular to the x- or y-axis.

    startAngle

    the value of the angle to calculate the start of the wedge neigborhood.

    endAngle

    the value of the angle to calculate the end of the wedge neigborhood.

    unitsType

    An esriGeoAnalysisUnitsEnum defining the type of units to calculate the neighborhood.
    The enumeration types are:

    
    esriUnitsMap  - neghbourhood is identified by map units (i.e., meters, feet)
    esriUnitsCells - neighbourhood is identified by number of cells

    A wedge-shaped neighborhood. The wedge is specified by the start angle, an end angle, and a radius. The wedge extends the radius distance counterclockwise from the starting angle to the ending angle. Angles are specified in degrees, with 0 or 360 representing East. Negative angles may be used.

    Product Availability

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

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    radius - The radius (in)
    startAngle - The startAngle (in)
    endAngle - The endAngle (in)
    unitsType - A com.esri.arcgis.geoanalyst.esriGeoAnalysisUnitsEnum constant (in)
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    setWeight

    void setWeight(int height,
                   int width,
                   Object entryValues)
                   throws IOException,
                          AutomationException
    Sets a neighborhood object each of whose entries can be assigned a weight.

    Remarks

    height

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

    width

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

    entryValues

    An array that defines the neighborhood and respective weight values. The value of each cell position in the neighborhood is multiplied by the corresponding weight value and the products are used in the neighborhood calculation. A "0" value is treated like any other value in the kernel.

    example: a weighted neighborhood array may look like the following.

    3 0 0 0 4
    0 2 0 3 0
    0 0 1 0 0

    Allows for defining an irregular neighborhood and for specifying which weights will be used to multiply the cell values on an input raster. 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 + 1)/2
    y = (height + 1)/2

    If the input number of cells is even, the x- and y-coordinates are computed using truncation.

    Product Availability

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

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    height - The height (in)
    width - The width (in)
    entryValues - A Variant (in)
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.