Class: QgsGeometryValidator

class qgis.core.QgsGeometryValidator(geometry: QgsGeometry, errors: object = None, method: QgsGeometry.ValidationMethod = QgsGeometry.ValidatorQgisInternal)

Bases: PyQt5.QtCore.QThread

Constructor for QgsGeometryValidator.

Parameters
  • geometry (QgsGeometry) –

  • errors (object = None) –

  • method

addError(self, QgsGeometry.Error)
childEvent()
connectNotify()
customEvent()
disconnectNotify()
errorFound

Sent when an error has been found during the validation process.

The error contains details about the error. [signal]

exec()
exec_()
isSignalConnected()
receivers()
run(self)
sender()
senderSignalIndex()
setTerminationEnabled()
stop(self)
timerEvent()
validateGeometry(geometry: QgsGeometry, method: QgsGeometry.ValidationMethod = QgsGeometry.ValidatorQgisInternal) → List[QgsGeometry.Error]

Validate geometry and produce a list of geometry errors. This method blocks the thread until the validation is finished.

Parameters
  • geometry (QgsGeometry) –

  • method (QgsGeometry.ValidationMethod = QgsGeometry.ValidatorQgisInternal) –

Return type

List[QgsGeometry.Error]

validationFinished

Sent when the validation is finished.

The result is in a human readable summary, mentioning if the validation has been aborted, successfully been validated or how many errors have been found.

New in version 3.6: [signal]