/usr/include/qgis/qgsrasteriterator.h is in libqgis-dev 2.8.6+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | /***************************************************************************
qgsrasteriterator.h
---------------------
begin : July 2012
copyright : (C) 2012 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSRASTERITERATOR_H
#define QGSRASTERITERATOR_H
#include "qgsrectangle.h"
#include <QMap>
class QgsMapToPixel;
class QgsRasterBlock;
class QgsRasterInterface;
class QgsRasterProjector;
struct QgsRasterViewPort;
/** \ingroup core
* Iterator for sequentially processing raster cells.
*/
class CORE_EXPORT QgsRasterIterator
{
public:
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, caller takes ownership of the block and
caller should delete the block.
@param bandNumber band to read
@param nCols number of columns on output device
@param nRows number of rows on output device
@param block address of block pointer
@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 { return mInput; }
void setMaximumTileWidth( int w ) { mMaximumTileWidth = w; }
int maximumTileWidth() const { return mMaximumTileWidth; }
void setMaximumTileHeight( int h ) { mMaximumTileHeight = h; }
int maximumTileHeight() const { return mMaximumTileHeight; }
private:
//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;
QgsRasterProjector* prj; //raster projector (or 0 if no reprojection is done)
};
QgsRasterInterface* mInput;
QMap<int, RasterPartInfo> mRasterPartInfos;
QgsRectangle mExtent;
int mMaximumTileWidth;
int mMaximumTileHeight;
/**Remove part into and release memory*/
void removePartInfo( int bandNumber );
};
#endif // QGSRASTERITERATOR_H
|