16 #ifndef QGSGCPTRANSFORMER_H
17 #define QGSGCPTRANSFORMER_H
21 #include "qgis_analysis.h"
51 InvalidTransform = 65535
87 virtual
int minimumGcpCount() const = 0;
101 bool transform(
double &x
SIP_INOUT,
double &y
SIP_INOUT,
bool inverseTransform = false ) const;
130 virtual GDALTransformerFunc GDALTransformer()
const = 0;
135 virtual void *GDALTransformerArgs()
const = 0;
161 bool getOriginScale(
QgsPointXY &origin,
double &scaleX,
double &scaleY )
const;
164 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
171 struct LinearParameters
176 bool invertYAxis =
false;
179 static int linearTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
180 double *x,
double *y,
double *z,
int *panSuccess );
200 bool getOriginScaleRotation(
QgsPointXY &origin,
double &scale,
double &rotation )
const;
203 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
211 struct HelmertParameters
216 bool invertYAxis =
false;
218 HelmertParameters mHelmertParameters;
220 static int helmertTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
221 double *x,
double *y,
double *z,
int *panSuccess );
240 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
247 void destroyGdalArgs();
249 QVector<QgsPointXY> mSourceCoords;
250 QVector<QgsPointXY> mDestCoordinates;
251 bool mInvertYAxis =
false;
253 const int mPolynomialOrder;
254 const bool mIsTPSTransform;
256 void *mGDALTransformerArgs =
nullptr;
277 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
284 struct ProjectiveParameters
291 static int projectiveTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
292 double *x,
double *y,
double *z,
int *panSuccess );
296 #endif //QGSGCPTRANSFORMER_H