com.esri.arcgis.geoanalyst
Class RasterNeighborhood

java.lang.Object
  extended by com.esri.arcgis.geoanalyst.RasterNeighborhood
All Implemented Interfaces:
IRasterNeighborhood, IRasterNeighborhood2, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class RasterNeighborhood
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IRasterNeighborhood, IRasterNeighborhood2, ISupportErrorInfo

ESRI Raster neighborhood object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
RasterNeighborhood()
          Constructs a RasterNeighborhood using ArcGIS Engine.
RasterNeighborhood(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RasterNeighborhood theRasterNeighborhood = (RasterNeighborhood) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 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 setHighPassFilter()
          Sets a 3 x 3 high-pass filter neighborhood.
 void setIrregular(int height, int width, Object entryValues)
          Sets a neighborhood object each of whose entries can be turned on or off.
 void setIrregularFile(String fileName)
          Sets an irregular neighborhood by a file.
 void setLowPassFilter()
          Sets a 3 x 3 low-pass filter neighborhood.
 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.
 void setWeightFile(String fileName)
          Sets a weight neighborhood by a file.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

RasterNeighborhood

public RasterNeighborhood()
                   throws IOException,
                          UnknownHostException
Constructs a RasterNeighborhood using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

RasterNeighborhood

public RasterNeighborhood(Object obj)
                   throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RasterNeighborhood theRasterNeighborhood = (RasterNeighborhood) obj;

Construct a RasterNeighborhood using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to RasterNeighborhood.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

setDefault

public 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

Specified by:
setDefault in interface IRasterNeighborhood
Specified by:
setDefault in interface IRasterNeighborhood2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAnnulus

public 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

Specified by:
setAnnulus in interface IRasterNeighborhood
Specified by:
setAnnulus in interface IRasterNeighborhood2
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

public 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

Specified by:
setCircle in interface IRasterNeighborhood
Specified by:
setCircle in interface IRasterNeighborhood2
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

public 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

Specified by:
setIrregular in interface IRasterNeighborhood
Specified by:
setIrregular in interface IRasterNeighborhood2
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

public 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

Specified by:
setRectangle in interface IRasterNeighborhood
Specified by:
setRectangle in interface IRasterNeighborhood2
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

public 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

Specified by:
setWedge in interface IRasterNeighborhood
Specified by:
setWedge in interface IRasterNeighborhood2
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

public 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

Specified by:
setWeight in interface IRasterNeighborhood
Specified by:
setWeight in interface IRasterNeighborhood2
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.

setHighPassFilter

public void setHighPassFilter()
                       throws IOException,
                              AutomationException
Sets a 3 x 3 high-pass filter neighborhood.

Product Availability

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

Specified by:
setHighPassFilter in interface IRasterNeighborhood2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLowPassFilter

public void setLowPassFilter()
                      throws IOException,
                             AutomationException
Sets a 3 x 3 low-pass filter neighborhood.

Product Availability

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

Specified by:
setLowPassFilter in interface IRasterNeighborhood2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setIrregularFile

public void setIrregularFile(String fileName)
                      throws IOException,
                             AutomationException
Sets an irregular neighborhood by a file.

Product Availability

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

Specified by:
setIrregularFile in interface IRasterNeighborhood2
Parameters:
fileName - The fileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWeightFile

public void setWeightFile(String fileName)
                   throws IOException,
                          AutomationException
Sets a weight neighborhood by a file.

Product Availability

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

Specified by:
setWeightFile in interface IRasterNeighborhood2
Parameters:
fileName - The fileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.