23 #ifndef QGSRASTERPROJECTOR_H
24 #define QGSRASTERPROJECTOR_H
57 int theSrcDatumTransform,
58 int theDestDatumTransform,
60 int theDestRows,
int theDestCols,
61 double theMaxSrcXRes,
double theMaxSrcYRes,
69 int theDestRows,
int theDestCols,
70 double theMaxSrcXRes,
double theMaxSrcYRes,
76 double theMaxSrcXRes,
double theMaxSrcYRes,
98 int srcDatumTransform = -1,
int destDatumTransform = -1 );
109 mMaxSrcXRes = theMaxSrcXRes; mMaxSrcYRes = theMaxSrcYRes;
115 static QString precisionLabel( Precision precision );
120 bool destExtentSize(
const QgsRectangle& theSrcExtent,
int theSrcXSize,
int theSrcYSize,
121 QgsRectangle& theDestExtent,
int& theDestXSize,
int& theDestYSize );
125 const QgsRectangle& theSrcExtent,
int theSrcXSize,
int theSrcYSize,
126 QgsRectangle& theDestExtent,
int& theDestXSize,
int& theDestYSize );
133 int srcRows() {
return mSrcRows; }
134 int srcCols() {
return mSrcCols; }
135 void setSrcRows(
int theRows ) { mSrcRows = theRows; mSrcXRes = mSrcExtent.
height() / mSrcRows; }
136 void setSrcCols(
int theCols ) { mSrcCols = theCols; mSrcYRes = mSrcExtent.width() / mSrcCols; }
142 bool srcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
144 int dstRows()
const {
return mDestRows; }
145 int dstCols()
const {
return mDestCols; }
148 void destPointOnCPMatrix(
int theRow,
int theCol,
double *theX,
double *theY );
151 int matrixRow(
int theDestRow );
152 int matrixCol(
int theDestCol );
155 QgsPoint srcPoint(
int theRow,
int theCol );
158 inline bool preciseSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
161 inline bool approximateSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol );
182 void calcSrcExtent();
185 void calcSrcRowsCols();
196 void calcHelper(
int theMatrixRow,
QgsPoint *thePoints );
211 int mSrcDatumTransform;
214 int mDestDatumTransform;
250 double mDestRowsPerMatrixRow;
253 double mDestColsPerMatrixCol;
279 double mSqrTolerance;
286 Precision mPrecision;
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.