com.esri.arcgis.geodatabase
Interface IRaster

All Superinterfaces:
Serializable
All Known Implementing Classes:
MosaicRaster, Raster

public interface IRaster
extends Serializable

Provides access to members that control an in-memory raster.

Remarks

The IRaster interface controls the reading of pixels from a Raster object.

The IRaster interface provides the ability to read data from a raster. This interface controls the resampling technique used when pixels are read from the Raster through the ResampleMethod property.

The CreatePixelBlock method creates a PixelBlock that can be used to read pixels from the Raster. The input Size specifies the number of rows and columns in the PixelBlock and is specified with the Pnt object.

The Read method transfers data into a PixelBlock after it is created. Once the data is read into the PixelBlock, it can be accessed through the methods on that object. The read can be initiated from any pixel in the raster, and the top-left corner of the area being read is specified as a Pnt using the tlc argument.

The CreateCursor method creates a RasterCursor that can be used to successively read the set of PixelBlocks that make up the Raster.

It is recommended to pass an integer type for the X and Y arguments when defining Pnt object for either the demension or the pixel location of the pixel block.

When To Use

The IRaster interface controls the reading of pixels from a Raster object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
MosaicRaster

Method Summary
 IRasterCursor createCursor()
          Allocates a Raster Cursor for fast raster scanning.
 IPixelBlock createPixelBlock(IPnt size)
          Allocates a PixelBlock of requested size.
 int getResampleMethod()
          Interpolation method used when reading pixels.
 void read(IPnt tlc, IPixelBlock block)
          Read a block of pixels starting from the top left corner.
 void setResampleMethod(int val)
          Interpolation method used when reading pixels.
 

Method Detail

read

void read(IPnt tlc,
          IPixelBlock block)
          throws IOException,
                 AutomationException
Read a block of pixels starting from the top left corner.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
tlc - A reference to a com.esri.arcgis.geodatabase.IPnt (in)
block - A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createPixelBlock

IPixelBlock createPixelBlock(IPnt size)
                             throws IOException,
                                    AutomationException
Allocates a PixelBlock of requested size.

Remarks

CreatePixelBlock method only initializes the properties of a pixel block, such as dimension, pixel type etc. Read method of this interface should be used to read pixels into the pixel block.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
size - A reference to a com.esri.arcgis.geodatabase.IPnt (in)
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.

createCursor

IRasterCursor createCursor()
                           throws IOException,
                                  AutomationException
Allocates a Raster Cursor for fast raster scanning.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getResampleMethod

int getResampleMethod()
                      throws IOException,
                             AutomationException
Interpolation method used when reading pixels.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.rstResamplingTypes constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setResampleMethod

void setResampleMethod(int val)
                       throws IOException,
                              AutomationException
Interpolation method used when reading pixels.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
val - A com.esri.arcgis.geodatabase.rstResamplingTypes constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.