23 #ifndef QGSRASTERPROJECTOR_H
24 #define QGSRASTERPROJECTOR_H
56 int theSrcDatumTransform,
57 int theDestDatumTransform,
59 int theDestRows,
int theDestCols,
60 double theMaxSrcXRes,
double theMaxSrcYRes,
67 int theDestRows,
int theDestCols,
68 double theMaxSrcXRes,
double theMaxSrcYRes,
73 double theMaxSrcXRes,
double theMaxSrcYRes,
95 int srcDatumTransform = -1,
int destDatumTransform = -1 );
106 mMaxSrcXRes = theMaxSrcXRes; mMaxSrcYRes = theMaxSrcYRes;
112 static QString precisionLabel( Precision precision );
117 bool destExtentSize(
const QgsRectangle& theSrcExtent,
int theSrcXSize,
int theSrcYSize,
118 QgsRectangle& theDestExtent,
int& theDestXSize,
int& theDestYSize );
122 const QgsRectangle& theSrcExtent,
int theSrcXSize,
int theSrcYSize,
123 QgsRectangle& theDestExtent,
int& theDestXSize,
int& theDestYSize );
130 int srcRows() {
return mSrcRows; }
131 int srcCols() {
return mSrcCols; }
132 void setSrcRows(
int theRows ) { mSrcRows = theRows; mSrcXRes = mSrcExtent.
height() / mSrcRows; }
133 void setSrcCols(
int theCols ) { mSrcCols = theCols; mSrcYRes = mSrcExtent.width() / mSrcCols; }
139 bool srcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
141 int dstRows()
const {
return mDestRows; }
142 int dstCols()
const {
return mDestCols; }
145 void destPointOnCPMatrix(
int theRow,
int theCol,
double *theX,
double *theY );
148 int matrixRow(
int theDestRow );
149 int matrixCol(
int theDestCol );
152 QgsPoint srcPoint(
int theRow,
int theCol );
155 inline bool preciseSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
158 inline bool approximateSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol );
179 void calcSrcExtent();
182 void calcSrcRowsCols();
193 void calcHelper(
int theMatrixRow,
QgsPoint *thePoints );
208 int mSrcDatumTransform;
211 int mDestDatumTransform;
247 double mDestRowsPerMatrixRow;
250 double mDestColsPerMatrixCol;
276 double mSqrTolerance;
283 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
DataType
Raster data types.
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)
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.