com.esri.arcgis.datasourcesraster
Class RasterCursor

java.lang.Object
  extended by com.esri.arcgis.datasourcesraster.RasterCursor
All Implemented Interfaces:
IRasterCursor, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class RasterCursor
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IRasterCursor

A raster cursor class.

Remarks

The RasterCursor object is used for iterating through all of the pixel blocks in a raster. It is useful for rasters that are too large to be brought into memory at once.


IRaster::CreateCursor or IRaster2::CreateCursorEx can be used to create a RasterCursor .


The IRaster::CreateCursor divides the Raster into blocks of 128 pixels high (rows) that span the full width of the raster. Each successive pixel block is read 128 lines below the previous pixel block. IRaster2::CreateCursorEx divides the Raster with your specified block size.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
PixelBlock, Serialized Form

Constructor Summary
RasterCursor(Object obj)
          Construct a RasterCursor using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 IPixelBlock getPixelBlock()
          The current PixelBlock.
 IPnt getTopLeft()
          The offset of the current PixelBlock.
 int hashCode()
          the hashcode for this object
 boolean next()
          Iterates to the next PixelBlock.
 void reset()
          Return to state when first created.
 
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

RasterCursor

public RasterCursor(Object obj)
             throws IOException
Construct a RasterCursor using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to RasterCursor.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
RasterCursor o = (RasterCursor)obj; // will not work

RasterCursor o = new RasterCursor(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems RasterCursor theRasterCursor = (RasterCursor) obj;
Method Detail

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

getTopLeft

public IPnt getTopLeft()
                throws IOException,
                       AutomationException
The offset of the current PixelBlock.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTopLeft in interface IRasterCursor
Returns:
A reference to a com.esri.arcgis.geodatabase.IPnt
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPixelBlock

public IPixelBlock getPixelBlock()
                          throws IOException,
                                 AutomationException
The current PixelBlock.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPixelBlock in interface IRasterCursor
Returns:
A reference to a com.esri.arcgis.geodatabase.IPixelBlock
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

next

public boolean next()
             throws IOException,
                    AutomationException
Iterates to the next PixelBlock.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
next in interface IRasterCursor
Returns:
The not_finished
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws IOException,
                  AutomationException
Return to state when first created.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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