Class: QgsVectorWarper¶
Vector layer warper which warps vector layers based on a list of source and destination GCPs.
Added in version 3.26.
Methods
Returns the last error obtained during transformation. |
|
Transforms the features from iterator and adds the results to the specified sink. |
- class qgis.analysis.QgsVectorWarper[source]¶
Bases:
object
- __init__(method: QgsGcpTransformerInterface.TransformMethod, points: Iterable[QgsGcpPoint], destinationCrs: QgsCoordinateReferenceSystem)
Constructor for QgsVectorWarper.
- Parameters:
method (QgsGcpTransformerInterface.TransformMethod) – specifies the transformation method
points (Iterable[QgsGcpPoint]) – list of GCP points to use for the transformation
destinationCrs (QgsCoordinateReferenceSystem) – target CRS for transformed features
- __init__(a0: QgsVectorWarper)
- Parameters:
a0 (QgsVectorWarper)
- transformFeatures(self, iterator: QgsFeatureIterator, sink: QgsFeatureSink | None, context: QgsCoordinateTransformContext, feedback: QgsFeedback | None = None) bool [source]¶
Transforms the features from
iterator
and adds the results to the specifiedsink
.The optional
feedback
argument can be used for progress reporting and cancellation.- Return type:
bool
- Returns:
True
if all features were successfully transformed- Parameters:
iterator (QgsFeatureIterator)
sink (Optional[QgsFeatureSink])
context (QgsCoordinateTransformContext)
feedback (Optional[QgsFeedback] = None)