Class: QgsGeometryValidator¶
Validates geometries using the QGIS geometry validation model.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Constructor
Methods
Static Methods
Returns the geometry validation engine configured in the application settings. |
|
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)
- static defaultValidationEngine() Qgis.GeometryValidationEngine[source]¶
Returns the geometry validation engine configured in the application settings.
- Return type:
- Returns:
The geometry validation engine to use.
Added in version 4.4.
- signal errorFound(error: QgsGeometry.Error)[source]¶
Sent when an error has been found during the validation process.
The
errorcontains 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]