23 QList<QgsGeometryCheckError *> &errors,
32 for (
const auto error : singleErrors )
33 errors.append( convertToGeometryCheckError( error, layerFeature ) );
44 Q_ASSERT( mCheck == other->
mCheck );
52 return mGeometry.equals( other->
mGeometry )
66 return mCheck->description();
76 return mErrorLocation;
A class to represent a 2D point.
QMap< QString, QgsFeatureIds > toMap() const
virtual bool isEqual(const QgsSingleGeometryCheckError *other) const
Check if this error is equal to other.
Contains a set of layers and feature ids in those layers to pass to a geometry check.
A geometry is the spatial representation of a feature.
Base class for geometry checks for a single geometry without any context of the layer or other layers...
virtual QList< QgsWkbTypes::GeometryType > compatibleGeometryTypes() const =0
A list of geometry types for which this check can be performed.
virtual bool handleChanges(const QList< QgsGeometryCheck::Change > &changes)
Apply a list of changes.
Base class for feedback objects to be used for cancellation of something running in a worker thread...
QgsGeometry errorLocation() const
The exact location of the error.
void collectErrors(const QMap< QString, QgsFeaturePool *> &featurePools, QList< QgsGeometryCheckError *> &errors, QStringList &messages, QgsFeedback *feedback=nullptr, const QgsGeometryCheck::LayerFeatureIds &ids=QgsGeometryCheck::LayerFeatureIds()) const FINAL
The main worker method.
QgsSingleGeometryCheckError * singleError() const
The underlying single error.
Utility class for identifying a unique vertex within a geometry.
QgsGeometryCheckErrorSingle(QgsSingleGeometryCheckError *singleError, const QgsGeometryCheckerUtils::LayerFeature &layerFeature)
Creates a new error for a QgsSingleGeometryCheck.
A layer feature combination to uniquely identify and access a feature in a set of layers...
QgsVertexId vertexId() const
The vertex id of the error.
QMap< QString, QgsFeatureIds > allLayerFeatureIds(const QMap< QString, QgsFeaturePool *> &featurePools) const
Returns all layers and feature ids.
const QString & layerId() const
The id of the layer on which this error has been detected.
Wraps a QgsSingleGeometryError into a standard QgsGeometryCheckError.
const QgsGeometryCheckContext * mContext
A list of layers and feature ids for each of these layers.
An error from a QgsSingleGeometryCheck.
virtual QString description() const
A human readable description of this error.
const QgsSingleGeometryCheck * check() const
The check that created this error.
bool handleChanges(const QgsGeometryCheck::Changes &changes) override
Apply a list of changes.
const QgsSingleGeometryCheck * mCheck
QMap< QString, QMap< QgsFeatureId, QList< QgsGeometryCheck::Change > > > Changes
A collection of changes.
virtual bool handleChanges(const QgsGeometryCheck::Changes &changes)
Apply a list of changes.
virtual QList< QgsSingleGeometryCheckError * > processGeometry(const QgsGeometry &geometry) const =0
Check the geometry for errors.
QgsFeatureId featureId() const
The id of the feature on which this error has been detected.
This represents an error reported by a geometry check.
QgsGeometry mErrorLocation
virtual void update(const QgsSingleGeometryCheckError *other)
Update this error with the information from other.