16#ifndef QGSGCPTRANSFORMER_H
17#define QGSGCPTRANSFORMER_H
21#include "qgis_analysis.h"
52 InvalidTransform = 65535
54 Q_ENUM( TransformMethod )
87 virtual
int minimumGcpCount() const = 0;
101 bool transform(
double &x
SIP_INOUT,
double &y
SIP_INOUT,
bool inverseTransform = false ) const;
160 bool getOriginScale(
QgsPointXY &origin,
double &scaleX,
double &scaleY )
const;
163 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
164 int minimumGcpCount()
const override;
165 GDALTransformerFunc GDALTransformer()
const override;
166 void *GDALTransformerArgs()
const override;
170 struct LinearParameters
175 bool invertYAxis =
false;
178 static int linearTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
179 double *x,
double *y,
double *z,
int *panSuccess );
198 bool getOriginScaleRotation(
QgsPointXY &origin,
double &scale,
double &rotation )
const;
201 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
202 int minimumGcpCount()
const override;
203 GDALTransformerFunc GDALTransformer()
const override;
204 void *GDALTransformerArgs()
const override;
209 struct HelmertParameters
214 bool invertYAxis =
false;
216 HelmertParameters mHelmertParameters;
218 static int helmertTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
219 double *x,
double *y,
double *z,
int *panSuccess );
238 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
239 int minimumGcpCount()
const override;
240 GDALTransformerFunc GDALTransformer()
const override;
241 void *GDALTransformerArgs()
const override;
245 void destroyGdalArgs();
247 QVector<QgsPointXY> mSourceCoords;
248 QVector<QgsPointXY> mDestCoordinates;
249 bool mInvertYAxis =
false;
251 const int mPolynomialOrder;
252 const bool mIsTPSTransform;
254 void *mGDALTransformerArgs =
nullptr;
274 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
275 int minimumGcpCount()
const override;
276 GDALTransformerFunc GDALTransformer()
const override;
277 void *GDALTransformerArgs()
const override;
281 struct ProjectiveParameters
288 static int projectiveTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
289 double *x,
double *y,
double *z,
int *panSuccess );
Custom exception class which is raised when an operation is not supported.
A class to represent a 2D point.
#define SIP_THROW(name,...)