IRaster Interface

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

When To Use

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

Members

Name Description
Method CreateCursor Allocates a Raster Cursor for fast raster scanning.
Method CreatePixelBlock Allocates a PixelBlock of requested size.
Method Read Read a block of pixels starting from the top left corner.
Read/write property ResampleMethod Interpolation method used when reading pixels.

IRaster.CreateCursor Method

Allocates a Raster Cursor for fast raster scanning.

Public Function CreateCursor ( _
) As IRasterCursor
public IRasterCursor CreateCursor (
);

IRaster.CreatePixelBlock Method

Allocates a PixelBlock of requested size.

Public Function CreatePixelBlock ( _
    ByVal Size As IPnt _
) As IPixelBlock
public IPixelBlock CreatePixelBlock (
    IPnt 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.

IRaster.Read Method

Read a block of pixels starting from the top left corner.

Public Sub Read ( _
    ByVal tlc As IPnt, _
    ByVal block As IPixelBlock _
)
public void Read (
    IPnt tlc,
    IPixelBlock block
);

IRaster.ResampleMethod Property

Interpolation method used when reading pixels.

Public Property ResampleMethod As rstResamplingTypes
public rstResamplingTypes ResampleMethod {get; set;}

Classes that implement IRaster

Classes Description
MosaicRaster (esriDataSourcesRaster) A mosaic of rasters.
Raster (esriDataSourcesRaster) An in-memory representation of a dynamic raster that can perform resampling and reprojection.

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.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.