Class: QgsVectorWarper¶
- class qgis.analysis.QgsVectorWarper¶
Bases:
sip.wrapper
Vector layer warper which warps vector layers based on a list of source and destination GCPs.
New in version 3.26.
QgsVectorWarper(method: QgsGcpTransformerInterface.TransformMethod, points: Iterable[QgsGcpPoint], destinationCrs:
QgsCoordinateReferenceSystem
) Constructor for QgsVectorWarper.- Parameters:
method – specifies the transformation method
points – list of GCP points to use for the transformation
destinationCrs – target CRS for transformed features
QgsVectorWarper(
QgsVectorWarper
)Methods
Returns the last error obtained during transformation.
Transforms the features from
iterator
and adds the results to the specifiedsink
.- error(self) str ¶
Returns the last error obtained during transformation.
- Return type:
str
- transformFeatures(self, iterator: QgsFeatureIterator, sink: QgsFeatureSink, context: QgsCoordinateTransformContext, feedback: QgsFeedback = None) bool ¶
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 (QgsFeatureSink) –
context (QgsCoordinateTransformContext) –
feedback (
QgsFeedback
= None) –