Subgroup: Geometry

Class: QgsGeometryCheck

class qgis.analysis.QgsGeometryCheck(context: QgsGeometryCheckContext, configuration: Dict[str, Any])

Bases: sip.wrapper

Create a new geometry check.

QgsGeometryCheck(QgsGeometryCheck)

This class manages all known geometry check factories.

QgsGeometryCheckRegistry is not usually directly created, but rather accessed through QgsAnalysis.geometryCheckRegistry()

Note

This class is a technology preview and unstable API.

New in version 3.4: Methods

checkType Returns the check type.
collectErrors The main worker method.
compatibleGeometryTypes A list of geometry types for which this check can be performed.
context Returns the context
description Returns a human readable description for this check.
flags Flags for this geometry check.
id Returns an id for this check.
isCompatible Returns if this geometry check is compatible with layer.
resolutionMethods Returns a list of descriptions for available resolutions for errors.

Signals

Attributes

AvailableInValidation
ChangeAdded
ChangeChanged
ChangeFeature
ChangeNode
ChangePart
ChangeRemoved
ChangeRing
FeatureCheck
FeatureNodeCheck
LayerCheck
staticMetaObject
AvailableInValidation = 2
class Change

Bases: sip.wrapper

QgsGeometryCheck.Change(_what: QgsGeometryCheck.ChangeWhat, _type: QgsGeometryCheck.ChangeType, _vidx: QgsVertexId = QgsVertexId()) Create a new Change

QgsGeometryCheck.Change(QgsGeometryCheck.Change)

type
vidx
what
ChangeAdded = 0
ChangeChanged = 2
ChangeFeature = 0
ChangeNode = 3
ChangePart = 1
ChangeRemoved = 1
ChangeRing = 2
class ChangeType

Bases: int

class ChangeWhat

Bases: int

class CheckType

Bases: int

FeatureCheck = 1
FeatureNodeCheck = 0
class Flag

Bases: int

class Flags

Bases: sip.wrapper

QgsGeometryCheck.Flags(Union[QgsGeometryCheck.Flags, QgsGeometryCheck.Flag]) QgsGeometryCheck.Flags(QgsGeometryCheck.Flags)

baseClass

alias of QgsGeometryCheck

LayerCheck = 2
class LayerFeatureIds

Bases: sip.wrapper

QgsGeometryCheck.LayerFeatureIds(QgsGeometryCheck.LayerFeatureIds)

checkType(self) → QgsGeometryCheck.CheckType

Returns the check type.

New in version 3.4.

collectErrors(self, featurePools: object, errors: object, messages: Iterable[str], feedback: QgsFeedback, ids: QgsGeometryCheck.LayerFeatureIds = QgsGeometryCheck.LayerFeatureIds()) → Tuple[object, List[str]]

The main worker method. Check all features available from featurePools and write errors found to errors. Other status messages can be written to messages. Progress should be reported to feedback. Only features and layers listed in ids should be checked.

New in version 3.4.

compatibleGeometryTypes(self) → object

A list of geometry types for which this check can be performed.

New in version 3.4.

context(self) → QgsGeometryCheckContext

Returns the context

New in version 3.4.

description(self) → str

Returns a human readable description for this check.

New in version 3.4.

flags(self) → QgsGeometryCheck.Flags

Flags for this geometry check.

id(self) → str

Returns an id for this check.

New in version 3.4.

isCompatible(self, layer: QgsVectorLayer) → bool

Returns if this geometry check is compatible with layer. By default it checks for the geometry type in ``compatibleGeometryTypes``().

New in version 3.4.

resolutionMethods(self) → List[str]

Returns a list of descriptions for available resolutions for errors. The index will be passed as method to fixError().

New in version 3.4.

staticMetaObject = <PyQt5.QtCore.QMetaObject object>