23 #ifndef QGSRASTERPROJECTOR_H
24 #define QGSRASTERPROJECTOR_H
49 int theSrcDatumTransform,
50 int theDestDatumTransform,
52 int theDestRows,
int theDestCols,
53 double theMaxSrcXRes,
double theMaxSrcYRes,
61 int theDestRows,
int theDestCols,
62 double theMaxSrcXRes,
double theMaxSrcYRes,
68 double theMaxSrcXRes,
double theMaxSrcYRes,
90 int srcDatumTransform = -1,
int destDatumTransform = -1 );
99 void setMaxSrcRes(
double theMaxSrcXRes,
double theMaxSrcYRes )
101 mMaxSrcXRes = theMaxSrcXRes; mMaxSrcYRes = theMaxSrcYRes;
111 int srcRows() {
return mSrcRows; }
112 int srcCols() {
return mSrcCols; }
113 void setSrcRows(
int theRows ) { mSrcRows = theRows; mSrcXRes = mSrcExtent.
height() / mSrcRows; }
114 void setSrcCols(
int theCols ) { mSrcCols = theCols; mSrcYRes = mSrcExtent.width() / mSrcCols; }
120 bool srcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
122 int dstRows()
const {
return mDestRows; }
123 int dstCols()
const {
return mDestCols; }
126 void destPointOnCPMatrix(
int theRow,
int theCol,
double *theX,
double *theY );
129 int matrixRow(
int theDestRow );
130 int matrixCol(
int theDestCol );
133 QgsPoint srcPoint(
int theRow,
int theCol );
136 inline bool preciseSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
139 inline bool approximateSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol );
160 void calcSrcExtent();
163 void calcSrcRowsCols();
174 void calcHelper(
int theMatrixRow,
QgsPoint *thePoints );
180 QString cpToString();
189 int mSrcDatumTransform;
192 int mDestDatumTransform;
228 double mDestRowsPerMatrixRow;
231 double mDestColsPerMatrixCol;
234 QList< QList<QgsPoint> > mCPMatrix;
238 QList< QList<bool> > mCPLegalMatrix;
257 double mSqrTolerance;