16 #ifndef QGS_GEOMETRY_CHECK_H 17 #define QGS_GEOMETRY_CHECK_H 19 #include <QApplication> 21 #include <QStringList> 24 #include "qgis_analysis.h" 147 QMap<QString, QgsFeatureIds>
toMap()
const 154 return ids.isEmpty();
201 AvailableInValidation = 1 << 1
203 Q_DECLARE_FLAGS( Flags,
Flag )
240 return what == other.
what && type == other.
type && vidx == other.
vidx;
248 typedef QMap<QString, QMap<QgsFeatureId, QList<QgsGeometryCheck::Change> > >
Changes;
265 return mConfiguration.value( name,
QgsSettings().value(
"/geometry_checker/" +
id() +
"/" + name, defaultValue ) ).value<T>();
282 virtual QList<QgsWkbTypes::GeometryType> compatibleGeometryTypes()
const = 0;
287 virtual QgsGeometryCheck::Flags flags()
const;
304 virtual void fixError(
const QMap<QString, QgsFeaturePool *> &featurePools,
QgsGeometryCheckError *error,
int method,
const QMap<QString, int> &mergeAttributeIndices, Changes &changes SIP_INOUT )
const SIP_SKIP;
311 virtual QStringList resolutionMethods()
const = 0;
318 virtual QString description()
const = 0;
325 virtual QString id()
const = 0;
349 QMap<QString, QgsFeatureIds> allLayerFeatureIds(
const QMap<QString, QgsFeaturePool *> &featurePools )
const SIP_SKIP;
357 void replaceFeatureGeometryPart(
const QMap<QString, QgsFeaturePool *> &featurePools,
const QString &layerId,
QgsFeature &feature,
int partIdx,
QgsAbstractGeometry *newPartGeom, Changes &changes )
const SIP_SKIP;
365 void deleteFeatureGeometryPart(
const QMap<QString, QgsFeaturePool *> &featurePools,
const QString &layerId,
QgsFeature &feature,
int partIdx, Changes &changes )
const SIP_SKIP;
373 void deleteFeatureGeometryRing(
const QMap<QString, QgsFeaturePool *> &featurePools,
const QString &layerId,
QgsFeature &feature,
int partIdx,
int ringIdx, Changes &changes )
const SIP_SKIP;
384 double scaleFactor(
const QPointer<QgsVectorLayer> &layer )
const SIP_SKIP;
387 #endif // QGS_GEOMETRY_CHECK_H This change happens on part level.
Flag
Flags for geometry checks.
This class is a composition of two QSettings instances:
Something has been added.
bool operator==(const QgsGeometryCheck::Change &other)
QMap< QString, QgsFeatureIds > toMap() const
CheckType
The type of a check.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QgsVertexId vidx
The index of the part / ring / vertex, depending on.
ChangeWhat
Description of a change to indicate at which level a change occurred.
T configurationValue(const QString &name, const QVariant &defaultValue=QVariant())
Returns the configuration value with the name, saved in the QGIS settings for this geometry check...
Base class for feedback objects to be used for cancelation of something running in a worker thread...
Base configuration for geometry checks.
The check controls geometries as a whole.
Something has been removed.
This change happens on ring level.
Utility class for identifying a unique vertex within a geometry.
QgsGeometryCheck::ChangeType type
What action this change performs.
QVariantMap mConfiguration
This class implements a geometry check.
Abstract base class for all geometries.
const QgsGeometryCheckContext * mContext
A list of layers and feature ids for each of these layers.
Change(QgsGeometryCheck::ChangeWhat _what, QgsGeometryCheck::ChangeType _type, QgsVertexId _vidx=QgsVertexId())
Create a new Change.
QMap< QString, QMap< QgsFeatureId, QList< QgsGeometryCheck::Change > > > Changes
A collection of changes.
A feature pool is based on a vector layer and caches features.
Descripts a change to fix a geometry.
ChangeType
Description of the type of a change.
QgsGeometryCheck::ChangeWhat what
What level this change affects.
const QgsGeometryCheckContext * context() const
Returns the context.
This represents an error reported by a geometry check.
Represents a vector layer which manages a vector based data sets.
This change happens on feature level.
The check controls individual nodes.