Class: QgsGeometryCheckError

class qgis.analysis.QgsGeometryCheckError(check: QgsGeometryCheck, layerFeature: QgsGeometryCheckerUtils.LayerFeature, errorLocation: QgsPointXY, vidx: QgsVertexId = QgsVertexId(), value: Any = None, valueType: QgsGeometryCheckError.ValueType = QgsGeometryCheckError.ValueOther)

Bases: sip.wrapper

Create a new geometry check error with the parent check and for the layerFeature pair at the errorLocation. Optionally the vertex can be specified via vixd and a value with its value Type for additional information.

QgsGeometryCheckError(check: QgsGeometryCheck, layerId: str, featureId: int, geometry: QgsGeometry, errorLocation: QgsPointXY, vidx: QgsVertexId = QgsVertexId(), value: Any = None, valueType: QgsGeometryCheckError.ValueType = QgsGeometryCheckError.ValueOther) Create a new geometry check error with the parent check and for the layer with layerId and featureId. The geometry of the error and the errorLocation need to be specified in map coordinates. Optionally the vertex can be specified via vixd and a value with its value Type for additional information.

QgsGeometryCheckError(QgsGeometryCheckError)

This represents an error reported by a geometry check.

Note

This class is a technology preview and unstable API.

New in version 3.4: Enums

Methods

affectedAreaBBox

The bounding box of the affected area of the error.

check

The geometry check that created this error.

closeMatch

Check if this error is almost equal to other.

description

The error description.

featureId

The id of the feature on which this error has been detected.

geometry

The geometry of the error in map units.

isEqual

Check if this error is equal to other.

layerId

The id of the layer on which this error has been detected.

location

The location of the error in map units.

resolutionMessage

A message with details, how the error has been resolved.

setFixFailed

Set the error status to failed and specify the reason for failure.

setFixed

Set the status to fixed and specify the method that has been used to fix the error.

setObsolete

Set the error status to obsolete.

status

The status of the error.

update

Update this error with the information from other.

value

An additional value for the error.

valueType

The type of the value.

vidx

The id of the affected vertex.

Signals

Attributes

StatusFixFailed

StatusFixed

StatusObsolete

StatusPending

ValueArea

ValueLength

ValueOther

class Status

Bases: int

StatusFixFailed = 1
StatusFixed = 2
StatusObsolete = 3
StatusPending = 0
ValueArea = 1
ValueLength = 0
ValueOther = 2
class ValueType

Bases: int

affectedAreaBBox(self) → QgsRectangle

The bounding box of the affected area of the error.

check(self) → QgsGeometryCheck

The geometry check that created this error.

closeMatch(self, QgsGeometryCheckError) → bool

Check if this error is almost equal to other. If this returns true, it can be used to update existing errors after re-checking.

description(self) → str

The error description. By default the description of the parent check will be returned.

featureId(self) → int

The id of the feature on which this error has been detected.

geometry(self) → QgsGeometry

The geometry of the error in map units.

isEqual(self, other: QgsGeometryCheckError) → bool

Check if this error is equal to other. Is reimplemented by subclasses with additional information, comparison of base information is done in parent class.

layerId(self) → str

The id of the layer on which this error has been detected.

location(self) → QgsPointXY

The location of the error in map units.

resolutionMessage(self) → str

A message with details, how the error has been resolved.

setFixFailed(self, reason: str)

Set the error status to failed and specify the reason for failure.

setFixed(self, method: int)

Set the status to fixed and specify the method that has been used to fix the error.

setObsolete(self)

Set the error status to obsolete.

status(self) → QgsGeometryCheckError.Status

The status of the error.

update(self, other: QgsGeometryCheckError)

Update this error with the information from other. Will be used to update existing errors whenever they are re-checked.

value(self) → Any

An additional value for the error. Lengths and areas are provided in map units.

See also

valueType()

valueType(self) → QgsGeometryCheckError.ValueType

The type of the value.

See also

value()

vidx(self) → QgsVertexId

The id of the affected vertex. May be valid or not, depending on the check.