QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsgeometryisvalidcheck.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsgeometryisvalidcheck.h
3 --------------------------------------
4Date : 7.9.2018
5Copyright : (C) 2018 by Matthias Kuhn
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSGEOMETRYISVALIDCHECK_H
17#define QGSGEOMETRYISVALIDCHECK_H
18
19#define SIP_NO_FILE
20
22
33{
34 public:
35
39 QgsGeometryIsValidCheckError( const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QString &errorDescription );
40
41 QString description() const override;
42
43 private:
44 QString mDescription;
45};
46
55class ANALYSIS_EXPORT QgsGeometryIsValidCheck : public QgsSingleGeometryCheck
56{
57 Q_DECLARE_TR_FUNCTIONS( QgsGeometryIsValidCheck )
58 public:
59
63 explicit QgsGeometryIsValidCheck( const QgsGeometryCheckContext *context, const QVariantMap &configuration );
64
65 QList<Qgis::GeometryType> compatibleGeometryTypes() const override;
66 QList<QgsSingleGeometryCheckError *> processGeometry( const QgsGeometry &geometry ) const override;
67 Q_DECL_DEPRECATED QStringList resolutionMethods() const override;
68 QString description() const override { return factoryDescription(); }
69 QString id() const override { return factoryId(); }
70 QgsGeometryCheck::CheckType checkType() const override { return factoryCheckType(); }
71
73 static QList<Qgis::GeometryType> factoryCompatibleGeometryTypes() SIP_SKIP;
74 static bool factoryIsCompatible( QgsVectorLayer *layer ) SIP_SKIP;
75 static QString factoryDescription() SIP_SKIP;
76 static QString factoryId() SIP_SKIP;
77 static QgsGeometryCheck::Flags factoryFlags() SIP_SKIP;
78 static QgsGeometryCheck::CheckType factoryCheckType() SIP_SKIP;
80};
81
82#endif // QGSGEOMETRYISVALIDCHECK_H
Base configuration for geometry checks.
Base class for geometry checks.
CheckType
The type of a check.
const QgsGeometryCheckContext * context() const
Returns the context.
QgsGeometryIsValidCheckError(const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QString &errorDescription)
Creates a new is valid check error.
QString id() const override
Returns an id for this check.
Q_DECL_DEPRECATED QStringList resolutionMethods() const override
Returns a list of descriptions for available resolutions for errors.
QgsGeometryCheck::CheckType checkType() const override
Returns the check type.
QgsGeometryIsValidCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Creates a new is valid check with the provided context.
QList< QgsSingleGeometryCheckError * > processGeometry(const QgsGeometry &geometry) const override
Check the geometry for errors.
QString description() const override
Returns a human readable description for this check.
QList< Qgis::GeometryType > compatibleGeometryTypes() const override
A list of geometry types for which this check can be performed.
A geometry is the spatial representation of a feature.
QgsGeometry errorLocation() const
The exact location of the error.
virtual QString description() const
A human readable description of this error.
QgsSingleGeometryCheckError(const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QgsVertexId &vertexId=QgsVertexId())
Creates a new single geometry check error.
const QgsSingleGeometryCheck * check() const
The check that created this error.
Base class for geometry checks for a single geometry without any context of the layer or other layers...
QgsSingleGeometryCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Creates a new single geometry check.
Represents a vector layer which manages a vector based dataset.
#define SIP_SKIP
Definition qgis_sip.h:134