QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
QgsRasterIterator Class Reference

Iterator for sequentially processing raster cells. More...

#include <qgsrasteriterator.h>

Classes

struct  RasterPartInfo

Public Member Functions

 QgsRasterIterator (QgsRasterInterface *input)
 ~QgsRasterIterator ()
void startRasterRead (int bandNumber, int nCols, int nRows, const QgsRectangle &extent)
 Start reading of raster band.
bool readNextRasterPart (int bandNumber, int &nCols, int &nRows, QgsRasterBlock **block, int &topLeftCol, int &topLeftRow)
 Fetches next part of raster data, caller takes ownership of the block and caller should delete the block.
void stopRasterRead (int bandNumber)
const QgsRasterInterfaceinput () const
void setMaximumTileWidth (int w)
int maximumTileWidth () const
void setMaximumTileHeight (int h)
int maximumTileHeight () const

Detailed Description

Iterator for sequentially processing raster cells.

Constructor & Destructor Documentation

QgsRasterIterator::QgsRasterIterator ( QgsRasterInterface input)
QgsRasterIterator::~QgsRasterIterator ( )

Member Function Documentation

const QgsRasterInterface* QgsRasterIterator::input ( ) const
inline
int QgsRasterIterator::maximumTileHeight ( ) const
inline
int QgsRasterIterator::maximumTileWidth ( ) const
inline
bool QgsRasterIterator::readNextRasterPart ( int  bandNumber,
int &  nCols,
int &  nRows,
QgsRasterBlock **  block,
int &  topLeftCol,
int &  topLeftRow 
)

Fetches next part of raster data, caller takes ownership of the block and caller should delete the block.

Parameters
bandNumberband to read
nColsnumber of columns on output device
nRowsnumber of rows on output device
blockaddress of block pointer
topLeftColtop left column
topLeftRowtop left row
Returns
false if the last part was already returned
void QgsRasterIterator::setMaximumTileHeight ( int  h)
inline
void QgsRasterIterator::setMaximumTileWidth ( int  w)
inline
void QgsRasterIterator::startRasterRead ( int  bandNumber,
int  nCols,
int  nRows,
const QgsRectangle extent 
)

Start reading of raster band.

Raster data can then be retrieved by calling readNextRasterPart until it returns false.

Parameters
bandNumbernumber of raster band to read
nColsnumber of columns
nRowsnumber of rows
extentarea to read
void QgsRasterIterator::stopRasterRead ( int  bandNumber)

The documentation for this class was generated from the following files: