QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | List of all members
QgsRasterIterator Class Reference

Iterator for sequentially processing raster cells. More...

#include <qgsrasteriterator.h>

Public Member Functions

 QgsRasterIterator (QgsRasterInterface *input)
 
 ~QgsRasterIterator ()
 
const QgsRasterInterfaceinput () const
 
int maximumTileHeight () const
 
int maximumTileWidth () const
 
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. More...
 
void setMaximumTileHeight (int h)
 
void setMaximumTileWidth (int w)
 
void startRasterRead (int bandNumber, int nCols, int nRows, const QgsRectangle &extent)
 Start reading of raster band. More...
 
void stopRasterRead (int bandNumber)
 

Detailed Description

Iterator for sequentially processing raster cells.

Definition at line 30 of file qgsrasteriterator.h.

Constructor & Destructor Documentation

QgsRasterIterator::QgsRasterIterator ( QgsRasterInterface input)

Definition at line 20 of file qgsrasteriterator.cpp.

QgsRasterIterator::~QgsRasterIterator ( )

Definition at line 25 of file qgsrasteriterator.cpp.

Member Function Documentation

const QgsRasterInterface* QgsRasterIterator::input ( ) const
inline

Definition at line 61 of file qgsrasteriterator.h.

int QgsRasterIterator::maximumTileHeight ( ) const
inline

Definition at line 67 of file qgsrasteriterator.h.

int QgsRasterIterator::maximumTileWidth ( ) const
inline

Definition at line 64 of file qgsrasteriterator.h.

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

Definition at line 51 of file qgsrasteriterator.cpp.

void QgsRasterIterator::setMaximumTileHeight ( int  h)
inline

Definition at line 66 of file qgsrasteriterator.h.

void QgsRasterIterator::setMaximumTileWidth ( int  w)
inline

Definition at line 63 of file qgsrasteriterator.h.

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

Definition at line 29 of file qgsrasteriterator.cpp.

void QgsRasterIterator::stopRasterRead ( int  bandNumber)

Definition at line 114 of file qgsrasteriterator.cpp.


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