23 #ifndef QGSRASTERPROJECTOR_H 24 #define QGSRASTERPROJECTOR_H 57 int theSrcDatumTransform,
58 int theDestDatumTransform,
60 int theDestRows,
int theDestCols,
61 double theMaxSrcXRes,
double theMaxSrcYRes,
68 int theDestRows,
int theDestCols,
69 double theMaxSrcXRes,
double theMaxSrcYRes,
74 double theMaxSrcXRes,
double theMaxSrcYRes,
96 int srcDatumTransform = -1,
int destDatumTransform = -1 );
107 mMaxSrcXRes = theMaxSrcXRes;
108 mMaxSrcYRes = theMaxSrcYRes;
119 bool destExtentSize(
const QgsRectangle& theSrcExtent,
int theSrcXSize,
int theSrcYSize,
120 QgsRectangle& theDestExtent,
int& theDestXSize,
int& theDestYSize );
124 const QgsRectangle& theSrcExtent,
int theSrcXSize,
int theSrcYSize,
125 QgsRectangle& theDestExtent,
int& theDestXSize,
int& theDestYSize );
132 int srcRows() {
return mSrcRows; }
133 int srcCols() {
return mSrcCols; }
134 void setSrcRows(
int theRows ) { mSrcRows = theRows; mSrcXRes = mSrcExtent.
height() / mSrcRows; }
135 void setSrcCols(
int theCols ) { mSrcCols = theCols; mSrcYRes = mSrcExtent.width() / mSrcCols; }
141 bool srcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
143 int dstRows()
const {
return mDestRows; }
144 int dstCols()
const {
return mDestCols; }
147 void destPointOnCPMatrix(
int theRow,
int theCol,
double *theX,
double *theY );
150 int matrixRow(
int theDestRow );
151 int matrixCol(
int theDestCol );
154 QgsPoint srcPoint(
int theRow,
int theCol );
157 inline bool preciseSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
160 inline bool approximateSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol );
181 void calcSrcExtent();
184 void calcSrcRowsCols();
195 void calcHelper(
int theMatrixRow,
QgsPoint *thePoints );
210 int mSrcDatumTransform;
213 int mDestDatumTransform;
249 double mDestRowsPerMatrixRow;
252 double mDestColsPerMatrixCol;
278 double mSqrTolerance;
virtual int bandCount() const =0
Get number of bands.
void setMaxSrcRes(double theMaxSrcXRes, double theMaxSrcYRes)
set maximum source resolution
A rectangle specified with double values.
Precision precision() const
QgsCoordinateReferenceSystem destCrs() const
Get destination CRS.
virtual QGis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
Base class for processing filters like renderers, reprojector, resampler etc.
A class to represent a point.
void setPrecision(Precision precision)
QgsCoordinateReferenceSystem srcCrs() const
Get source CRS.
Precision
Precison defines if each pixel is reprojected or approximate reprojection based on an approximation m...
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
Class for storing a coordinate reference system (CRS)
DataType
Raster data types.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height)=0
Read block of data using given extent and size.
double height() const
Height of the rectangle.