2012-09-24 02:28:15 +02:00
|
|
|
class QgsRasterIterator
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsrasteriterator.h>
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsRasterIterator( QgsRasterInterface *input );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Start reading of raster band. Raster data can then be retrieved by calling readNextRasterPart until it returns false.
|
2012-09-24 02:28:15 +02:00
|
|
|
@param bandNumber number of raster band to read
|
|
|
|
@param nCols number of columns
|
|
|
|
@param nRows number of rows
|
|
|
|
@param extent area to read
|
2017-01-16 22:27:14 +01:00
|
|
|
@param feedback optional raster feedback object for cancelation/preview. Added in QGIS 3.0.
|
2012-09-24 02:28:15 +02:00
|
|
|
*/
|
2017-05-02 07:21:20 +02:00
|
|
|
void startRasterRead( int bandNumber, int nCols, int nRows, const QgsRectangle &extent, QgsRasterBlockFeedback *feedback = 0 );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Fetches next part of raster data, caller takes ownership of the block and
|
2014-01-27 09:22:24 +01:00
|
|
|
caller should delete the block.
|
2012-09-24 02:28:15 +02:00
|
|
|
@param bandNumber band to read
|
|
|
|
@param nCols number of columns on output device
|
|
|
|
@param nRows number of rows on output device
|
2014-01-27 09:22:24 +01:00
|
|
|
@param block address of block pointer
|
2012-09-24 02:28:15 +02:00
|
|
|
@param topLeftCol top left column
|
|
|
|
@param topLeftRow top left row
|
|
|
|
@return false if the last part was already returned*/
|
|
|
|
bool readNextRasterPart( int bandNumber,
|
|
|
|
int& nCols, int& nRows,
|
2014-01-27 09:22:24 +01:00
|
|
|
QgsRasterBlock **block,
|
2017-05-01 18:13:15 +02:00
|
|
|
int &topLeftCol, int &topLeftRow );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
void stopRasterRead( int bandNumber );
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
const QgsRasterInterface *input() const;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
void setMaximumTileWidth( int w );
|
|
|
|
int maximumTileWidth() const;
|
|
|
|
|
|
|
|
void setMaximumTileHeight( int h );
|
|
|
|
int maximumTileHeight() const;
|
2017-02-21 13:44:40 +01:00
|
|
|
|
|
|
|
static const int DEFAULT_MAXIMUM_TILE_WIDTH;
|
|
|
|
static const int DEFAULT_MAXIMUM_TILE_HEIGHT;
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|