23#ifndef QGSRASTERPROJECTOR_H
24#define QGSRASTERPROJECTOR_H
70 int bandCount() const override;
72 Qgis::DataType dataType(
int bandNo ) const override;
95 static QString precisionLabel( Precision precision );
113 Q_DECL_DEPRECATED
int mSrcDatumTransform = -1;
116 Q_DECL_DEPRECATED
int mDestDatumTransform = -1;
119 Precision mPrecision = Approximate;
142 ProjectorData(
const ProjectorData &other ) =
delete;
143 ProjectorData &operator=(
const ProjectorData &other ) =
delete;
150 bool srcRowCol(
int destRow,
int destCol,
int *srcRow,
int *srcCol );
153 int srcRows()
const {
return mSrcRows; }
154 int srcCols()
const {
return mSrcCols; }
158 void destPointOnCPMatrix(
int row,
int col,
double *theX,
double *theY )
const;
161 int matrixRow(
int destRow )
const;
164 int matrixCol(
int destCol )
const;
167 inline bool preciseSrcRowCol(
int destRow,
int destCol,
int *srcRow,
int *srcCol );
170 inline bool approximateSrcRowCol(
int destRow,
int destCol,
int *srcRow,
int *srcCol );
173 void insertRows(
const QgsCoordinateTransform &ct );
176 void insertCols(
const QgsCoordinateTransform &ct );
179 void calcCP(
int row,
int col,
const QgsCoordinateTransform &ct );
182 bool calcRow(
int row,
const QgsCoordinateTransform &ct );
185 bool calcCol(
int col,
const QgsCoordinateTransform &ct );
188 void calcSrcExtent();
191 void calcSrcRowsCols();
197 bool checkCols(
const QgsCoordinateTransform &ct )
const;
203 bool checkRows(
const QgsCoordinateTransform &ct )
const;
206 void calcHelper(
int matrixRow, QgsPointXY *points );
212 QString cpToString()
const;
218 bool mApproximate =
false;
221 QgsCoordinateTransform mInverseCt;
224 QgsRectangle mDestExtent;
227 QgsRectangle mSrcExtent;
230 QgsRectangle mExtent;
239 double mDestXRes = 0.0;
242 double mDestYRes = 0.0;
251 double mSrcXRes = 0.0;
254 double mSrcYRes = 0.0;
257 double mDestRowsPerMatrixRow = 0.0;
260 double mDestColsPerMatrixCol = 0.0;
263 QList< QList<QgsPointXY> > mCPMatrix;
267 QList< QList<bool> > mCPLegalMatrix;
271 QgsPointXY *pHelperTop =
nullptr;
275 QgsPointXY *pHelperBottom =
nullptr;
278 int mHelperTopRow = 0;
286 double mSqrTolerance = 0.0;
289 double mMaxSrcXRes = 0;
290 double mMaxSrcYRes = 0;
Provides global constants and enumerations for use throughout the application.
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Feedback object tailored for raster block reading.
Base class for processing filters like renderers, reprojector, resampler etc.
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr)=0
Read block of data using given extent and size.
QgsRasterInterface(QgsRasterInterface *input=nullptr)
Implements approximate projection support for optimised raster transformation.
QgsCoordinateReferenceSystem destinationCrs() const
Returns the destination CRS.
QgsCoordinateReferenceSystem sourceCrs() const
Returns the source CRS.
void setPrecision(Precision precision)
Precision
Precision defines if each pixel is reprojected or approximate reprojection based on an approximation ...
@ Exact
Exact, precise but slow.
@ Approximate
Approximate (default), fast but possibly inaccurate.
Precision precision() const
Q_DECL_DEPRECATED void setCrs(const QgsCoordinateReferenceSystem &srcCRS, const QgsCoordinateReferenceSystem &destCRS, int srcDatumTransform=-1, int destDatumTransform=-1)
Sets the source and destination CRS.
A rectangle specified with double values.