QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
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 cannot be copied. More... | |
QgsGcpGeometryTransformer (QgsGcpTransformerInterface *gcpTransformer) | |
Constructor for QgsGcpGeometryTransformer, which uses the specified gcpTransformer to modify geometries. More... | |
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. More... | |
~QgsGcpGeometryTransformer () override | |
QgsGcpTransformerInterface * | gcpTransformer () const |
Returns the underlying GCP transformer used to transform geometries. More... | |
QgsGcpGeometryTransformer & | operator= (const QgsGcpGeometryTransformer &other)=delete |
QgsGcpGeometryTransformer cannot be copied. More... | |
void | setGcpTransformer (QgsGcpTransformerInterface *transformer) |
Sets the underlying GCP transformer used to transform geometries. More... | |
QgsGeometry | transform (const QgsGeometry &geometry, bool &ok, QgsFeedback *feedback=nullptr) |
Transforms the specified input geometry using the GCP based transform. More... | |
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. More... | |
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 35 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 |
QgsGcpGeometryTransformer cannot be copied.
QgsGcpTransformerInterface * QgsGcpGeometryTransformer::gcpTransformer | ( | ) | const |
Returns the underlying GCP transformer used to transform geometries.
Definition at line 59 of file qgsgcpgeometrytransformer.cpp.
|
delete |
QgsGcpGeometryTransformer cannot be copied.
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.