QgsGeometryGapCheckError class

An error produced by a QgsGeometryGapCheck.

Base classes

class QgsGeometryCheckError
This represents an error reported by a geometry check.

Constructors, destructors, conversion operators

QgsGeometryGapCheckError(const QgsGeometryCheck* check, const QString& layerId, const QgsGeometry& geometry, const QMap<QString, QgsFeatureIds>& neighbors, double area, const QgsRectangle& gapAreaBBox)
Create a new gap check error produced by check on the layer layerId.

Public functions

auto affectedAreaBBox() const -> QgsRectangle override
The bounding box of the affected area of the error.
auto closeMatch(QgsGeometryCheckError*) const -> bool override
Check if this error is almost equal to other.
auto handleChanges(const QgsGeometryCheck::Changes& changes) -> bool override
Apply a list of changes.
auto isEqual(QgsGeometryCheckError* other) const -> bool override
Check if this error is equal to other.
auto neighbors() const -> const QMap<QString, QgsFeatureIds>&
A map of layers and feature ids of the neighbors of the gap.
void update(const QgsGeometryCheckError* other) override
Update this error with the information from other.

Function documentation

QgsGeometryGapCheckError::QgsGeometryGapCheckError(const QgsGeometryCheck* check, const QString& layerId, const QgsGeometry& geometry, const QMap<QString, QgsFeatureIds>& neighbors, double area, const QgsRectangle& gapAreaBBox)

Create a new gap check error produced by check on the layer layerId.

The geometry of the gap needs to be in map coordinates. The neighbors are a map of layer ids and feature ids. The area of the gap in map units and the bounding box of the gap in map units too.

bool QgsGeometryGapCheckError::closeMatch(QgsGeometryCheckError*) const override

Check if this error is almost equal to other.

If this returns true, it can be used to update existing errors after re-checking.

bool QgsGeometryGapCheckError::isEqual(QgsGeometryCheckError* other) const override

Check if this error is equal to other.

Is reimplemented by subclasses with additional information, comparison of base information is done in parent class.

void QgsGeometryGapCheckError::update(const QgsGeometryCheckError* other) override

Update this error with the information from other.

Will be used to update existing errors whenever they are re-checked.