QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
22 const QString &layerId,
27 const QVariant &value,
ValueType valueType )
30 , mFeatureId( featureId )
31 , mGeometry( geometry )
32 , mErrorLocation( errorLocation )
35 , mValueType( valueType )
36 , mStatus( StatusPending )
44 const QVariant &value,
47 , mLayerId( layerFeature.layerId() )
48 , mFeatureId( layerFeature.feature().id() )
49 , mErrorLocation( errorLocation )
52 , mValueType( valueType )
53 , mStatus( StatusPending )
77 QgsDebugMsg( QStringLiteral(
"Can not show error in current map coordinate reference system" ) );
104 if ( fix.id() == method )
157 else if (
mVidx.
part > change.vidx.part )
170 else if (
mVidx.
ring > change.vidx.ring )
196 return QMap<QString, QSet<QgsFeatureId> >();
QVariant value() const
An additional value for the error.
void setFixFailed(const QString &reason)
Set the error status to failed and specify the reason for failure.
virtual QgsRectangle contextBoundingBox() const
The context of the error.
QgsCoordinateReferenceSystem crs
Descripts a change to fix a geometry.
static QgsAbstractGeometry * getGeomPart(QgsAbstractGeometry *geom, int partIdx)
@ ChangeAdded
Something has been added.
@ ChangeFeature
This change happens on feature level.
virtual bool closeMatch(QgsGeometryCheckError *) const
Check if this error is almost equal to other.
const QgsGeometryCheck * check() const
The geometry check that created this error.
@ StatusFixed
The error is fixed.
ValueType
Describes the type of an error value.
bool useMapCrs() const
Returns if the geometry is reprojected to the map CRS or not.
Qgis::GeometryOperationResult transform(const QgsCoordinateTransform &ct, Qgis::TransformDirection direction=Qgis::TransformDirection::Forward, bool transformZ=false) SIP_THROW(QgsCsException)
Transforms this geometry as described by the coordinate transform ct.
QgsFeatureId featureId() const
The id of the feature on which this error has been detected.
QMap< QString, QMap< QgsFeatureId, QList< QgsGeometryCheck::Change > > > Changes
A collection of changes.
QgsGeometry geometry() const
Returns the geometry of this feature.
QgsPointXY mErrorLocation
@ FeatureNodeCheck
The check controls individual nodes.
const QgsGeometryCheckContext * context() const
Returns the context.
@ ChangeChanged
Something has been updated.
bool partEqual(QgsVertexId o) const SIP_HOLDGIL
Returns true if this vertex ID belongs to the same part as another vertex ID.
A rectangle specified with double values.
@ ChangeRemoved
Something has been removed.
This class implements a geometry check.
QPointer< QgsVectorLayer > layer() const
The layer.
Custom exception class for Coordinate Reference System related exceptions.
virtual CheckType checkType() const =0
Returns the check type.
virtual QgsRectangle affectedAreaBBox() const
The bounding box of the affected area of the error.
void setFixed(int method)
Set the status to fixed and specify the method that has been used to fix the error.
virtual bool handleChanges(const QgsGeometryCheck::Changes &changes)
Apply a list of changes.
@ ChangeNode
This change happens on node level.
virtual QList< QgsGeometryCheckResolutionMethod > availableResolutionMethods() const
Returns a list of available resolution methods.
This class implements a resolution for problems detected in geometry checks.
virtual QgsAbstractGeometry * clone() const =0
Clones the geometry by performing a deep copy.
const QgsCoordinateReferenceSystem mapCrs
The coordinate system in which calculations should be done.
A layer feature combination to uniquely identify and access a feature in a set of layers.
Status status() const
The status of the error.
@ StatusFixFailed
A fix has been tried on the error but failed.
const QgsVertexId & vidx() const
The id of the affected vertex.
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...
const QgsAbstractGeometry * constGet() const SIP_HOLDGIL
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
virtual bool isEqual(QgsGeometryCheckError *other) const
Check if this error is equal to other.
A class to represent a 2D point.
@ ChangePart
This change happens on part level.
A geometry is the spatial representation of a feature.
@ ChangeRing
This change happens on ring level.
Represents a vector layer which manages a vector based data sets.
Utility class for identifying a unique vertex within a geometry.
virtual void update(const QgsGeometryCheckError *other)
Update this error with the information from other.
bool ringEqual(QgsVertexId o) const SIP_HOLDGIL
Returns true if this vertex ID belongs to the same ring as another vertex ID (i.e.
const QgsGeometryCheck * mCheck
QgsRectangle boundingBox() const
Returns the bounding box of the geometry.
@ StatusObsolete
The error is obsolete because of other modifications.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
const QString & layerId() const
The id of the layer on which this error has been detected.
This represents an error reported by a geometry check.
virtual QIcon icon() const
Returns an icon that should be shown for this kind of error.
const QgsCoordinateTransformContext transformContext
The coordinate transform context with which transformations will be done.
QgsGeometry geometry() const
The geometry of the error in map units.
LayerFeatureIds()=default
QString mResolutionMessage
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
virtual QMap< QString, QgsFeatureIds > involvedFeatures() const
Returns a list of involved features.