18 #ifndef QGS_GEOMETRY_GAP_CHECK_H 19 #define QGS_GEOMETRY_GAP_CHECK_H 42 const QString &layerId,
44 const QMap<QString, QgsFeatureIds> &neighbors,
48 , mNeighbors( neighbors )
49 , mGapAreaBBox( gapAreaBBox )
56 const QMap<QString, QgsFeatureIds> &
neighbors()
const {
return mNeighbors; }
70 QIcon
icon()
const override;
73 QMap<QString, QgsFeatureIds> mNeighbors;
106 void fixError(
const QMap<QString, QgsFeaturePool *> &featurePools,
QgsGeometryCheckError *error,
int method,
const QMap<QString, int> &mergeAttributeIndices,
Changes &changes )
const override;
110 QString
id()
const override;
111 QgsGeometryCheck::Flags
flags()
const override;
115 static QString factoryDescription()
SIP_SKIP;
116 static QString factoryId()
SIP_SKIP;
117 static QgsGeometryCheck::Flags factoryFlags()
SIP_SKIP;
118 static QList<QgsWkbTypes::GeometryType> factoryCompatibleGeometryTypes()
SIP_SKIP;
124 bool mergeWithNeighbor(
const QMap<QString, QgsFeaturePool *> &featurePools,
127 const double mGapThresholdMapUnits;
130 #endif // QGS_GEOMETRY_GAP_CHECK_H A rectangle specified with double values.
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.
QList< QgsWkbTypes::GeometryType > compatibleGeometryTypes() const override
A list of geometry types for which this check can be performed.
virtual void update(const QgsGeometryCheckError *other)
Update this error with the information from other.
Checks for gaps between neighbouring polygons.
virtual bool closeMatch(QgsGeometryCheckError *) const
Check if this error is almost equal to other.
CheckType
The type of a check.
A geometry is the spatial representation of a feature.
Base class for feedback objects to be used for cancellation of something running in a worker thread...
Base configuration for geometry checks.
An error produced by a QgsGeometryGapCheck.
Utility class for identifying a unique vertex within a geometry.
virtual QString id() const =0
Returns an id for this check.
This class implements a geometry check.
ResolutionMethod
Resolution methods for geometry gap checks.
QgsGeometryCheck::CheckType checkType() const override
Returns the check type.
A list of layers and feature ids for each of these layers.
virtual QIcon icon() const
Returns an icon that should be shown for this kind of error.
const QMap< QString, QgsFeatureIds > & neighbors() const
A map of layers and feature ids of the neighbors of the gap.
virtual QMap< QString, QgsFeatureIds > involvedFeatures() const
Returns a list of involved features.
QMap< QString, QMap< QgsFeatureId, QList< QgsGeometryCheck::Change > > > Changes
A collection of changes.
virtual QString description() const =0
Returns a human readable description for this check.
virtual QgsRectangle affectedAreaBBox() const
The bounding box of the affected area of the error.
virtual void fixError(const QMap< QString, QgsFeaturePool *> &featurePools, QgsGeometryCheckError *error, int method, const QMap< QString, int > &mergeAttributeIndices, Changes &changes) const
Fix the error error with the specified method.
virtual bool handleChanges(const QgsGeometryCheck::Changes &changes)
Apply a list of changes.
virtual QStringList resolutionMethods() const =0
Returns a list of descriptions for available resolutions for errors.
virtual QgsGeometryCheck::Flags flags() const
Flags for this geometry check.
This represents an error reported by a geometry check.
virtual void collectErrors(const QMap< QString, QgsFeaturePool *> &featurePools, QList< QgsGeometryCheckError *> &errors, QStringList &messages, QgsFeedback *feedback, const LayerFeatureIds &ids=QgsGeometryCheck::LayerFeatureIds()) const =0
The main worker method.
Represents a vector layer which manages a vector based data sets.
virtual bool isEqual(QgsGeometryCheckError *other) const
Check if this error is equal to other.
Merge the gap with the polygon with the longest shared edge.