16#ifndef QGSGCPTRANSFORMER_H
17#define QGSGCPTRANSFORMER_H
21#include "qgis_analysis.h"
52 InvalidTransform = 65535
54 Q_ENUM( TransformMethod )
88 virtual
int minimumGcpCount() const = 0;
102 bool transform(
double &x
SIP_INOUT,
double &y
SIP_INOUT,
bool inverseTransform = false ) const;
162 bool getOriginScale(
QgsPointXY &origin,
double &scaleX,
double &scaleY )
const;
165 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
166 int minimumGcpCount()
const override;
167 GDALTransformerFunc GDALTransformer()
const override;
168 void *GDALTransformerArgs()
const override;
172 struct LinearParameters
177 bool invertYAxis =
false;
180 static int linearTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
181 double *x,
double *y,
double *z,
int *panSuccess );
201 bool getOriginScaleRotation(
QgsPointXY &origin,
double &scale,
double &rotation )
const;
204 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
205 int minimumGcpCount()
const override;
206 GDALTransformerFunc GDALTransformer()
const override;
207 void *GDALTransformerArgs()
const override;
212 struct HelmertParameters
217 bool invertYAxis =
false;
219 HelmertParameters mHelmertParameters;
221 static int helmertTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
222 double *x,
double *y,
double *z,
int *panSuccess );
241 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
242 int minimumGcpCount()
const override;
243 GDALTransformerFunc GDALTransformer()
const override;
244 void *GDALTransformerArgs()
const override;
248 void destroyGdalArgs();
250 QVector<QgsPointXY> mSourceCoords;
251 QVector<QgsPointXY> mDestCoordinates;
252 bool mInvertYAxis =
false;
254 const int mPolynomialOrder;
255 const bool mIsTPSTransform;
257 void *mGDALTransformerArgs =
nullptr;
278 bool updateParametersFromGcps(
const QVector<QgsPointXY> &sourceCoordinates,
const QVector<QgsPointXY> &destinationCoordinates,
bool invertYAxis =
false )
override;
279 int minimumGcpCount()
const override;
280 GDALTransformerFunc GDALTransformer()
const override;
281 void *GDALTransformerArgs()
const override;
285 struct ProjectiveParameters
292 static int projectiveTransform(
void *pTransformerArg,
int bDstToSrc,
int nPointCount,
293 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,...)