24 , mFeatureId( featureId )
25 , mGeometry( geometry )
26 , mErrorLocation( errorLocation )
29 , mValueType( valueType )
30 , mStatus( StatusPending )
36 , mLayerId( layerFeature.layerId() )
37 , mFeatureId( layerFeature.feature().id() )
38 , mErrorLocation( errorLocation )
41 , mValueType( valueType )
42 , mStatus( StatusPending )
63 QgsDebugError( QStringLiteral(
"Can not show error in current map coordinate reference system" ) );
89 if ( fix.id() == method )
139 else if (
mVidx.
part > change.vidx.part )
152 else if (
mVidx.
ring > change.vidx.ring )
178 return QMap<QString, QSet<QgsFeatureId>>();
virtual QgsAbstractGeometry * clone() const =0
Clones the geometry by performing a deep copy.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
Custom exception class for Coordinate Reference System related exceptions.
const QgsCoordinateTransformContext transformContext
The coordinate transform context with which transformations will be done.
const QgsCoordinateReferenceSystem mapCrs
The coordinate system in which calculations should be done.
This represents an error reported by a geometry check.
ValueType
Describes the type of an error value.
virtual QMap< QString, QgsFeatureIds > involvedFeatures() const
Returns a list of involved features.
@ StatusFixed
The error is fixed.
@ StatusFixFailed
A fix has been tried on the error but failed.
@ StatusObsolete
The error is obsolete because of other modifications.
Status status() const
The status of the error.
const QgsVertexId & vidx() const
The id of the affected vertex.
QgsFeatureId featureId() const
The id of the feature on which this error has been detected.
virtual void update(const QgsGeometryCheckError *other)
Update this error with the information from other.
const QgsGeometryCheck * mCheck
QgsGeometryCheckError(const QgsGeometryCheck *check, const QgsGeometryCheckerUtils::LayerFeature &layerFeature, const QgsPointXY &errorLocation, QgsVertexId vidx=QgsVertexId(), const QVariant &value=QVariant(), ValueType valueType=ValueOther)
Create a new geometry check error with the parent check and for the layerFeature pair at the errorLoc...
void setFixed(int method)
Set the status to fixed and specify the method that has been used to fix the error.
void setFixFailed(const QString &reason)
Set the error status to failed and specify the reason for failure.
QgsGeometry geometry() const
The geometry of the error in map units.
QgsPointXY mErrorLocation
const QgsGeometryCheck * check() const
The geometry check that created this error.
virtual bool isEqual(QgsGeometryCheckError *other) const
Check if this error is equal to other.
const QString & layerId() const
The id of the layer on which this error has been detected.
virtual bool closeMatch(QgsGeometryCheckError *) const
Check if this error is almost equal to other.
virtual QgsRectangle affectedAreaBBox() const
The bounding box of the affected area of the error.
virtual QIcon icon() const
Returns an icon that should be shown for this kind of error.
virtual bool handleChanges(const QgsGeometryCheck::Changes &changes)
Apply a list of changes.
QString mResolutionMessage
virtual QgsRectangle contextBoundingBox() const
The context of the error.
This class implements a resolution for problems detected in geometry checks.
This class implements a geometry check.
QMap< QString, QMap< QgsFeatureId, QList< QgsGeometryCheck::Change > > > Changes
A collection of changes.
virtual QList< QgsGeometryCheckResolutionMethod > availableResolutionMethods() const
Returns a list of available resolution methods.
@ ChangeNode
This change happens on node level.
@ ChangeRing
This change happens on ring level.
@ ChangeFeature
This change happens on feature level.
@ ChangePart
This change happens on part level.
@ FeatureNodeCheck
The check controls individual nodes.
@ ChangeChanged
Something has been updated.
@ ChangeAdded
Something has been added.
@ ChangeRemoved
Something has been removed.
virtual CheckType checkType() const =0
Returns the check type.
const QgsGeometryCheckContext * context() const
Returns the context.
A layer feature combination to uniquely identify and access a feature in a set of layers.
QgsGeometry geometry() const
Returns the geometry of this feature.
bool useMapCrs() const
Returns if the geometry is reprojected to the map CRS or not.
QgsCoordinateReferenceSystem layerCrs() const
The layer CRS.
static QgsAbstractGeometry * getGeomPart(QgsAbstractGeometry *geom, int partIdx)
A geometry is the spatial representation of a feature.
Qgis::GeometryOperationResult transform(const QgsCoordinateTransform &ct, Qgis::TransformDirection direction=Qgis::TransformDirection::Forward, bool transformZ=false)
Transforms this geometry as described by the coordinate transform ct.
const QgsAbstractGeometry * constGet() const
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
QgsRectangle boundingBox() const
Returns the bounding box of the geometry.
A class to represent a 2D point.
A rectangle specified with double values.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
#define QgsDebugError(str)
Descripts a change to fix a geometry.
LayerFeatureIds()=default
Utility class for identifying a unique vertex within a geometry.
bool ringEqual(QgsVertexId o) const
Returns true if this vertex ID belongs to the same ring as another vertex ID (i.e.
bool partEqual(QgsVertexId o) const
Returns true if this vertex ID belongs to the same part as another vertex ID.