Class: QgsSingleGeometryCheck¶
Base class for geometry checks for a single geometry without any context of the layer or other layers in the project.
Classic examples are validity checks like self-intersection.
Subclasses need to implement the processGeometry method.
Added in version 3.4.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: QgsGeometryCheck.checkType()
, QgsGeometryCheck.collectErrors()
, QgsGeometryCheck.compatibleGeometryTypes()
, QgsGeometryCheck.description()
, QgsGeometryCheck.id()
, processGeometry()
Class Hierarchy¶
Base classes¶
Base class for geometry checks. |
Abstract Methods
Check the geometry for errors. |
- class qgis.analysis.QgsSingleGeometryCheck[source]¶
Bases:
QgsGeometryCheck
- __init__(context: QgsGeometryCheckContext | None, configuration: Dict[str, Any])
Creates a new single geometry check.
- Parameters:
context (Optional[QgsGeometryCheckContext])
configuration (Dict[str, Any])
- __init__(a0: QgsSingleGeometryCheck)
- Parameters:
- abstract processGeometry(self, geometry: QgsGeometry) List[QgsSingleGeometryCheckError] ¶
Check the
geometry
for errors. It may make use ofconfiguration
options.Returns a list of
QgsSingleGeometryCheckErrors
, ownership is transferred to the caller. An empty list is returned for geometries without errors.Added in version 3.4.
- Parameters:
geometry (QgsGeometry)
- Return type: