QgsGeometryGapCheck class
Checks for gaps between neighbouring polygons.
Contents
Base classes
- class QgsGeometryCheck
- This class implements a geometry check.
Public types
- enum ResolutionMethod { MergeLongestEdge, NoChange }
- Resolution methods for geometry gap checks.
Constructors, destructors, conversion operators
- QgsGeometryGapCheck(const QgsGeometryCheckContext* context, const QVariantMap& configuration) explicit
- The configuration accepts a "gapThreshold" key which specifies the maximum gap size in squared map units.
Public functions
-
auto checkType() const -> QgsGeometryCheck::
CheckType override - Returns the check type.
- void collectErrors(const QMap<QString, QgsFeaturePool*>& featurePools, QList<QgsGeometryCheckError*>& errors, QStringList& messages, QgsFeedback* feedback, const LayerFeatureIds& ids = LayerFeatureIds()) const override
- The main worker method.
-
auto compatibleGeometryTypes() const -> QList<QgsWkbTypes::
GeometryType> override - A list of geometry types for which this check can be performed.
- auto description() const -> QString override
- Returns a human readable description for this check.
- void fixError(const QMap<QString, QgsFeaturePool*>& featurePools, QgsGeometryCheckError* error, int method, const QMap<QString, int>& mergeAttributeIndices, Changes& changes) const override
- Fix the error error with the specified method.
- auto flags() const -> QgsGeometryCheck::Flags override
- Flags for this geometry check.
- auto id() const -> QString override
- Returns an id for this check.
- auto resolutionMethods() const -> QStringList override
- Returns a list of descriptions for available resolutions for errors.
Enum documentation
enum QgsGeometryGapCheck:: ResolutionMethod
Resolution methods for geometry gap checks.
| Enumerators | |
|---|---|
| MergeLongestEdge |
Merge the gap with the polygon with the longest shared edge. |
| NoChange |
Do not handle the error. |
Function documentation
QgsGeometryGapCheck:: QgsGeometryGapCheck(const QgsGeometryCheckContext* context,
const QVariantMap& configuration) explicit
The configuration accepts a "gapThreshold" key which specifies the maximum gap size in squared map units.
Any gaps which are larger than this area are accepted. If "gapThreshold" is set to 0, the check is disabled.
QgsGeometryCheck:: CheckType QgsGeometryGapCheck:: checkType() const override
Returns the check type.
void QgsGeometryGapCheck:: collectErrors(const QMap<QString, QgsFeaturePool*>& featurePools,
QList<QgsGeometryCheckError*>& errors,
QStringList& messages,
QgsFeedback* feedback,
const LayerFeatureIds& ids = LayerFeatureIds()) const override
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.
QList<QgsWkbTypes:: GeometryType> QgsGeometryGapCheck:: compatibleGeometryTypes() const override
A list of geometry types for which this check can be performed.
QString QgsGeometryGapCheck:: description() const override
Returns a human readable description for this check.
void QgsGeometryGapCheck:: fixError(const QMap<QString, QgsFeaturePool*>& featurePools,
QgsGeometryCheckError* error,
int method,
const QMap<QString, int>& mergeAttributeIndices,
Changes& changes) const override
Fix the error error with the specified method.
QString QgsGeometryGapCheck:: id() const override
Returns an id for this check.
QStringList QgsGeometryGapCheck:: resolutionMethods() const override
Returns a list of descriptions for available resolutions for errors.
The index will be passed as method to