Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

SDTSRasterReader Class Reference

Class for reading raster data from a raster layer. More...

#include <sdts_al.h>

List of all members.


Public Members

int GetTransform ( double * )
Fetch the transformation between pixel/line coordinates and georeferenced coordinates. More...

int GetXSize ()
Fetch the raster width. More...

int GetYSize ()
Fetch the raster height. More...

int GetBlockXSize ()
Fetch the width of a source block (usually same as raster width).

int GetBlockYSize ()
Fetch the height of a source block (usually one).

int GetBlock ( int nXOffset, int nYOffset, void * pData )
Read a block of raster data from the file. More...


Detailed Description

Class for reading raster data from a raster layer.

This class is somewhat unique amoung the reader classes in that it isn't derived from SDTSIndexedFeature, and it doesn't return "features". Instead it is used to read raster blocks, in the natural block size of the dataset.


Member Function Documentation

int SDTSRasterReader::GetTransform (double * padfTransformOut)

Fetch the transformation between pixel/line coordinates and georeferenced coordinates.

Parameters:
padfTransformOut - pointer to an array of six doubles which will be filled with the georeferencing transform.

Returns:
TRUE is returned, indicating success.

The padfTransformOut array consists of six values. The pixel/line coordinate (Xp,Yp) can be related to a georeferenced coordinate (Xg,Yg) or (Easting, Northing).

  Xg = padfTransformOut[0] + Xp * padfTransform[1] + Yp * padfTransform[2]
  Yg = padfTransformOut[3] + Xp * padfTransform[4] + Yp * padfTransform[5]
  

In other words, for a north up image the top left corner of the top left pixel is at georeferenced coordinate (padfTransform[0],padfTransform[3]) the pixel width is padfTransform[1], the pixel height is padfTransform[5] and padfTransform[2] and padfTransform[4] will be zero.

int SDTSRasterReader::GetXSize ()

Fetch the raster width.

Returns:
the width in pixels.

int SDTSRasterReader::GetYSize ()

Fetch the raster height.

Returns:
the height in pixels.

int SDTSRasterReader::GetBlock (int nXOffset, int nYOffset, void * pData)

Read a block of raster data from the file.

Parameters:
nXOffset - X block offset into the file. Normally zero for scanline organized raster files.

Parameters:
nYOffset - Y block offset into the file. Normally the scanline offset from top of raster for scanline organized raster files.

Parameters:
pData - pointer to GInt16 (signed short) buffer of data into which to read the raster.

Returns:

The documentation for this classwas generated from the following files:
Generated at Wed Sep 22 10:32:08 1999 for SDTS_AL by doxygen  written by Dimitri van Heesch, © 1997-1999