1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/georeferencing/qgsgcptransformer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsGcpTransformerInterface /Abstract/
{
%Docstring(signature="appended")
An interface for Ground Control Points (GCP) based transformations.
:py:class:`QgsGcpTransformerInterface` implementations are able to
transform point locations based on a transformation method and a list of
GCPs.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgsgcptransformer.h"
%End
public:
static const QMetaObject staticMetaObject;
public:
enum class TransformMethod /BaseType=IntEnum/
{
Linear,
Helmert,
PolynomialOrder1,
PolynomialOrder2,
PolynomialOrder3,
ThinPlateSpline,
Projective,
InvalidTransform
};
QgsGcpTransformerInterface();
virtual ~QgsGcpTransformerInterface();
virtual QgsGcpTransformerInterface *clone() const = 0 /Factory/;
%Docstring
Clones the transformer, returning a new copy of the transformer with the
same parameters as this one.
Caller takes ownership of the returned object.
%End
virtual bool updateParametersFromGcps( const QVector<QgsPointXY> &sourceCoordinates, const QVector<QgsPointXY> &destinationCoordinates, bool invertYAxis = false ) throw( QgsNotSupportedException ) = 0;
%Docstring
Fits transformation parameters using the specified Ground Control Points
(GCPs) lists of source and destination coordinates.
If ``invertYAxis`` is set to ``True`` then the y-axis of source
coordinates will be inverted, e.g. to allow for transformation of raster
layers with ascending top-to-bottom vertical axis coordinates.
:return: ``True`` on success, ``False`` on failure
%End
virtual int minimumGcpCount() const = 0;
%Docstring
Returns the minimum number of Ground Control Points (GCPs) required for
parameter fitting.
%End
virtual TransformMethod method() const = 0;
%Docstring
Returns the transformation method.
%End
bool transform( double &x /In,Out/, double &y /In,Out/, bool inverseTransform = false ) const;
%Docstring
Transforms the point (``x``, ``y``) from source to destination
coordinates.
If ``inverseTransform`` is set to ``True``, the point will be
transformed from the destination to the source.
:return: ``True`` if transformation was successful.
%End
static QString methodToString( TransformMethod method );
%Docstring
Returns a translated string representing the specified transform
``method``.
%End
static QgsGcpTransformerInterface *create( TransformMethod method ) /Factory/;
%Docstring
Creates a new QgsGcpTransformerInterface subclass representing the
specified transform ``method``.
Caller takes ownership of the returned object.
%End
static QgsGcpTransformerInterface *createFromParameters( TransformMethod method, const QVector<QgsPointXY> &sourceCoordinates, const QVector<QgsPointXY> &destinationCoordinates ) throw( QgsNotSupportedException ) /Factory/;
%Docstring
Creates a new QgsGcpTransformerInterface subclass representing the
specified transform ``method``, initialized using the given lists of
source and destination coordinates.
If the parameters cannot be fit to a transform ``None`` will be
returned.
Caller takes ownership of the returned object.
%End
private:
QgsGcpTransformerInterface( const QgsGcpTransformerInterface &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/georeferencing/qgsgcptransformer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|