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 );
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;
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.
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.
QgsCoordinateReferenceSystem srcCrs() const
Get source CRS.
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.