QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
31 , mConfiguration( configuration )
37 Q_UNUSED( configuration )
52 Q_UNUSED( featurePools )
55 Q_UNUSED( mergeAttributeIndices )
61 QList<QgsGeometryCheckResolutionMethod> fixes;
69 for (
const QString &method : methods )
84 QMap<QString, QgsFeatureIds> featureIds;
87 featureIds.insert( pool->layerId(), pool->allFeatureIds() );
101 geomCollection->removeGeometry( partIdx );
102 geomCollection->addGeometry( newPartGeom );
144 int partIdx,
int ringIdx,
Changes &changes )
const
158 static_cast<QgsCurvePolygon *
>( partGeom )->removeInteriorRing( ringIdx - 1 );
virtual void prepare(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Will be run in the main thread before collectErrors is called (which may be run from a background thr...
QgsCoordinateReferenceSystem crs
Descripts a change to fix a geometry.
virtual QList< QgsWkbTypes::GeometryType > compatibleGeometryTypes() const =0
A list of geometry types for which this check can be performed.
static QgsAbstractGeometry * getGeomPart(QgsAbstractGeometry *geom, int partIdx)
@ ChangeAdded
Something has been added.
@ ChangeFeature
This change happens on feature level.
int numGeometries() const
Returns the number of geometries within the collection.
QgsGeometryCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Create a new geometry check.
Curve polygon geometry type.
QMap< QString, QMap< QgsFeatureId, QList< QgsGeometryCheck::Change > > > Changes
A collection of changes.
void replaceFeatureGeometryPart(const QMap< QString, QgsFeaturePool * > &featurePools, const QString &layerId, QgsFeature &feature, int partIdx, QgsAbstractGeometry *newPartGeom, Changes &changes) const
Replaces a part in a feature geometry.
QMap< QString, QgsFeatureIds > allLayerFeatureIds(const QMap< QString, QgsFeaturePool * > &featurePools) const
Returns all layers and feature ids.
const QgsGeometryCheckContext * context() const
Returns the context.
@ ChangeChanged
Something has been updated.
virtual Q_DECL_DEPRECATED QStringList resolutionMethods() const
Returns a list of descriptions for available resolutions for errors.
@ ChangeRemoved
Something has been removed.
#define Q_NOWARN_DEPRECATED_POP
virtual QgsGeometryCheck::Flags flags() const
Flags for this geometry check.
virtual void fixError(const QMap< QString, QgsFeaturePool * > &featurePools, QgsGeometryCheckError *error, int method, const QMap< QString, int > &mergeAttributeIndices, Changes &changes) const
Fixes the error error with the specified method.
virtual void deleteFeature(QgsFeatureId fid)=0
Removes a feature from this pool.
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
virtual void updateFeature(QgsFeature &feature)=0
Updates a feature in this pool.
double scaleFactor(const QPointer< QgsVectorLayer > &layer) const
Determines the scale factor of a layer to the map coordinate reference system.
void deleteFeatureGeometryRing(const QMap< QString, QgsFeaturePool * > &featurePools, const QString &layerId, QgsFeature &feature, int partIdx, int ringIdx, Changes &changes) const
Deletes a ring in a feature geometry.
virtual QList< QgsGeometryCheckResolutionMethod > availableResolutionMethods() const
Returns a list of available resolution methods.
const QgsCoordinateReferenceSystem mapCrs
The coordinate system in which calculations should be done.
Abstract base class for all geometries.
const QgsGeometryCheckContext * mContext
QgsRectangle extent() const FINAL
Returns the extent of the layer.
QgsAbstractGeometry * get()
Returns a modifiable (non-const) reference to the underlying abstract geometry primitive.
@ ChangePart
This change happens on part level.
@ ChangeRing
This change happens on ring level.
Utility class for identifying a unique vertex within a geometry.
virtual bool isCompatible(QgsVectorLayer *layer) const
Returns if this geometry check is compatible with layer.
void deleteFeatureGeometryPart(const QMap< QString, QgsFeaturePool * > &featurePools, const QString &layerId, QgsFeature &feature, int partIdx, Changes &changes) const
Deletes a part of a feature geometry.
Q_INVOKABLE QgsWkbTypes::GeometryType geometryType() const
Returns point, line or polygon.
#define Q_NOWARN_DEPRECATED_PUSH
const QgsCoordinateTransformContext transformContext
The coordinate transform context with which transformations will be done.