|
QGIS API Documentation
2.4.0-Chugiak
|
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. More... | |
| 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 | stopRasterRead (int bandNumber) |
| const QgsRasterInterface * | input () const |
| void | setMaximumTileWidth (int w) |
| int | maximumTileWidth () const |
| void | setMaximumTileHeight (int h) |
| int | maximumTileHeight () const |
Private Member Functions | |
| void | removePartInfo (int bandNumber) |
| Remove part into and release memory. More... | |
Private Attributes | |
| QgsRasterInterface * | mInput |
| QMap< int, RasterPartInfo > | mRasterPartInfos |
| QgsRectangle | mExtent |
| int | mMaximumTileWidth |
| int | mMaximumTileHeight |
Iterator for sequentially processing raster cells.
Definition at line 30 of file qgsrasteriterator.h.
| QgsRasterIterator::QgsRasterIterator | ( | QgsRasterInterface * | input | ) |
Definition at line 20 of file qgsrasteriterator.cpp.
| QgsRasterIterator::~QgsRasterIterator | ( | ) |
Definition at line 25 of file qgsrasteriterator.cpp.
|
inline |
Definition at line 61 of file qgsrasteriterator.h.
Referenced by QgsRasterFileWriter::writeDataRaster(), and QgsRasterFileWriter::writeImageRaster().
|
inline |
Definition at line 67 of file qgsrasteriterator.h.
Referenced by QgsRasterFileWriter::writeDataRaster(), and QgsRasterFileWriter::writeImageRaster().
|
inline |
Definition at line 64 of file qgsrasteriterator.h.
Referenced by QgsRasterFileWriter::writeDataRaster(), and QgsRasterFileWriter::writeImageRaster().
| 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.
| bandNumber | band to read |
| nCols | number of columns on output device |
| nRows | number of rows on output device |
| block | address of block pointer |
| topLeftCol | top left column |
| topLeftRow | top left row |
Definition at line 51 of file qgsrasteriterator.cpp.
References QgsRasterInterface::block(), QgsRasterIterator::RasterPartInfo::currentCol, QgsRasterIterator::RasterPartInfo::currentRow, QgsRectangle::height(), mExtent, mInput, mMaximumTileHeight, mMaximumTileWidth, mRasterPartInfos, QgsRasterIterator::RasterPartInfo::nCols, QgsRasterIterator::RasterPartInfo::nRows, QgsRasterIterator::RasterPartInfo::prj, QgsDebugMsg, QgsRectangle::width(), QgsRectangle::xMinimum(), and QgsRectangle::yMaximum().
Referenced by QgsRasterDrawer::draw(), QgsRasterFileWriter::writeDataRaster(), and QgsRasterFileWriter::writeImageRaster().
|
private |
Remove part into and release memory.
Definition at line 119 of file qgsrasteriterator.cpp.
References mRasterPartInfos, and QgsRasterIterator::RasterPartInfo::prj.
Referenced by startRasterRead(), and stopRasterRead().
|
inline |
Definition at line 66 of file qgsrasteriterator.h.
Referenced by QgsRasterFileWriter::writeDataRaster(), and QgsRasterFileWriter::writeImageRaster().
|
inline |
Definition at line 63 of file qgsrasteriterator.h.
Referenced by QgsRasterFileWriter::writeDataRaster(), and QgsRasterFileWriter::writeImageRaster().
| 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.
| bandNumber | number of raster band to read |
| nCols | number of columns |
| nRows | number of rows |
| extent | area to read |
Definition at line 29 of file qgsrasteriterator.cpp.
References QgsRasterIterator::RasterPartInfo::currentCol, QgsRasterIterator::RasterPartInfo::currentRow, mExtent, mInput, mRasterPartInfos, QgsRasterIterator::RasterPartInfo::nCols, QgsRasterIterator::RasterPartInfo::nRows, QgsRasterIterator::RasterPartInfo::prj, and removePartInfo().
Referenced by QgsRasterDrawer::draw(), QgsRasterFileWriter::writeDataRaster(), and QgsRasterFileWriter::writeImageRaster().
| void QgsRasterIterator::stopRasterRead | ( | int | bandNumber | ) |
Definition at line 114 of file qgsrasteriterator.cpp.
References removePartInfo().
|
private |
Definition at line 82 of file qgsrasteriterator.h.
Referenced by readNextRasterPart(), and startRasterRead().
|
private |
Definition at line 80 of file qgsrasteriterator.h.
Referenced by readNextRasterPart(), and startRasterRead().
|
private |
Definition at line 85 of file qgsrasteriterator.h.
Referenced by readNextRasterPart().
|
private |
Definition at line 84 of file qgsrasteriterator.h.
Referenced by readNextRasterPart().
|
private |
Definition at line 81 of file qgsrasteriterator.h.
Referenced by readNextRasterPart(), removePartInfo(), and startRasterRead().
1.8.7