mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
class QgsRasterIterator
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsrasteriterator.h>
|
|
%End
|
|
public:
|
|
//Stores information about reading of a raster band. Columns and rows are in unsampled coordinates
|
|
struct RasterPartInfo
|
|
{
|
|
int currentCol;
|
|
int currentRow;
|
|
int nCols;
|
|
int nRows;
|
|
QgsRasterBlock *block;
|
|
QgsRasterProjector* prj; //raster projector (or 0 if no reprojection is done)
|
|
};
|
|
|
|
QgsRasterIterator( QgsRasterInterface* input );
|
|
~QgsRasterIterator();
|
|
|
|
/**Start reading of raster band. Raster data can then be retrieved by calling readNextRasterPart until it returns false.
|
|
@param bandNumber number of raster band to read
|
|
@param nCols number of columns
|
|
@param nRows number of rows
|
|
@param extent area to read
|
|
*/
|
|
void startRasterRead( int bandNumber, int nCols, int nRows, const QgsRectangle& extent );
|
|
|
|
/**Fetches next part of raster data
|
|
@param bandNumber band to read
|
|
@param nCols number of columns on output device
|
|
@param nRows number of rows on output device
|
|
@param block to return the pointer to raster block
|
|
@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,
|
|
QgsRasterBlock** block,
|
|
int& topLeftCol, int& topLeftRow );
|
|
|
|
void stopRasterRead( int bandNumber );
|
|
|
|
const QgsRasterInterface* input() const;
|
|
|
|
void setMaximumTileWidth( int w );
|
|
int maximumTileWidth() const;
|
|
|
|
void setMaximumTileHeight( int h );
|
|
int maximumTileHeight() const;
|
|
};
|