Class: QgsGeometryValidator¶
Validates geometries using the QGIS geometry validation model.
Class Hierarchy¶
Base classes¶
Methods
Static Methods
Validate geometry and produce a list of geometry errors. |
Signals
Sent when an error has been found during the validation process. |
|
Sent when the validation is finished. |
- class qgis.core.QgsGeometryValidator[source]¶
Bases:
QThread
- __init__(geometry: QgsGeometry, errors: Iterable[QgsGeometry.Error] | None = [], method: Qgis.GeometryValidationEngine = Qgis.GeometryValidationEngine.QgisInternal)
Constructor for QgsGeometryValidator.
- Parameters:
geometry (QgsGeometry)
errors (Optional[Iterable[QgsGeometry.Error]] = [])
method (Qgis.GeometryValidationEngine = Qgis.GeometryValidationEngine.QgisInternal)
- addError(self, a0: QgsGeometry.Error)[source]¶
- Parameters:
a0 (QgsGeometry.Error)
- signal errorFound(error: QgsGeometry.Error)[source]¶
Sent when an error has been found during the validation process.
The
error
contains details about the error.- Parameters:
error (QgsGeometry.Error)
- static validateGeometry(geometry: QgsGeometry, method: Qgis.GeometryValidationEngine = Qgis.GeometryValidationEngine.QgisInternal) List[QgsGeometry.Error] [source]¶
Validate geometry and produce a list of geometry errors. This method blocks the thread until the validation is finished.
- Parameters:
geometry (QgsGeometry)
method (Qgis.GeometryValidationEngine = Qgis.GeometryValidationEngine.QgisInternal)
- Return type:
List[QgsGeometry.Error]