QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
A geometry transformer which uses an underlying Ground Control Points (GCP) based transformation to modify geometries. More...
#include <qgsgcpgeometrytransformer.h>
Public Member Functions | |
QgsGcpGeometryTransformer (const QgsGcpGeometryTransformer &other)=delete | |
QgsGcpGeometryTransformer (QgsGcpTransformerInterface *gcpTransformer) | |
Constructor for QgsGcpGeometryTransformer, which uses the specified gcpTransformer to modify geometries. | |
QgsGcpGeometryTransformer (QgsGcpTransformerInterface::TransformMethod method, const QVector< QgsPointXY > &sourceCoordinates, const QVector< QgsPointXY > &destinationCoordinates) | |
Constructor for QgsGcpGeometryTransformer, which uses the specified transform method and list of source and destination coordinates to transform geometries. | |
~QgsGcpGeometryTransformer () override | |
QgsGcpTransformerInterface * | gcpTransformer () const |
Returns the underlying GCP transformer used to transform geometries. | |
QgsGcpGeometryTransformer & | operator= (const QgsGcpGeometryTransformer &other)=delete |
void | setGcpTransformer (QgsGcpTransformerInterface *transformer) |
Sets the underlying GCP transformer used to transform geometries. | |
QgsGeometry | transform (const QgsGeometry &geometry, bool &ok, QgsFeedback *feedback=nullptr) |
Transforms the specified input geometry using the GCP based transform. | |
bool | transformPoint (double &x, double &y, double &z, double &m) override |
Transforms the point defined by the coordinates (x, y, z) and the specified m value. | |
Public Member Functions inherited from QgsAbstractGeometryTransformer | |
virtual | ~QgsAbstractGeometryTransformer ()=default |
A geometry transformer which uses an underlying Ground Control Points (GCP) based transformation to modify geometries.
Definition at line 36 of file qgsgcpgeometrytransformer.h.
QgsGcpGeometryTransformer::QgsGcpGeometryTransformer | ( | QgsGcpTransformerInterface * | gcpTransformer | ) |
Constructor for QgsGcpGeometryTransformer, which uses the specified gcpTransformer to modify geometries.
Ownership of gcpTransformer is transferred to the geometry transformer.
Definition at line 21 of file qgsgcpgeometrytransformer.cpp.
QgsGcpGeometryTransformer::QgsGcpGeometryTransformer | ( | QgsGcpTransformerInterface::TransformMethod | method, |
const QVector< QgsPointXY > & | sourceCoordinates, | ||
const QVector< QgsPointXY > & | destinationCoordinates | ||
) |
Constructor for QgsGcpGeometryTransformer, which uses the specified transform method and list of source and destination coordinates to transform geometries.
Definition at line 27 of file qgsgcpgeometrytransformer.cpp.
|
overridedefault |
|
delete |
QgsGcpTransformerInterface * QgsGcpGeometryTransformer::gcpTransformer | ( | ) | const |
Returns the underlying GCP transformer used to transform geometries.
Definition at line 59 of file qgsgcpgeometrytransformer.cpp.
|
delete |
void QgsGcpGeometryTransformer::setGcpTransformer | ( | QgsGcpTransformerInterface * | transformer | ) |
Sets the underlying GCP transformer used to transform geometries.
Ownership is transferred to this object.
Definition at line 64 of file qgsgcpgeometrytransformer.cpp.
QgsGeometry QgsGcpGeometryTransformer::transform | ( | const QgsGeometry & | geometry, |
bool & | ok, | ||
QgsFeedback * | feedback = nullptr |
||
) |
Transforms the specified input geometry using the GCP based transform.
geometry | Input geometry to transform |
ok | will be set to true if geometry was successfully transformed, or false if an error occurred |
feedback | This optional argument can be used to cancel the transformation before it completes. If this is done, the geometry will be left in a semi-transformed state. |
Definition at line 43 of file qgsgcpgeometrytransformer.cpp.
|
overridevirtual |
Transforms the point defined by the coordinates (x, y, z) and the specified m value.
x | point x coordinate |
y | point y coordinate |
z | point z coordinate, or NaN if the input point is 2D only |
m | point m value, or NaN if not available |
true
if point was transformed (or no transformation was required), or false
if point could not be transformed successfully.A transformer which multiples the x coordinate by 3 and adds 10 to the y coordinate:
Implements QgsAbstractGeometryTransformer.
Definition at line 35 of file qgsgcpgeometrytransformer.cpp.