QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
Public Member Functions | List of all members
QgsGeometryMissingVertexCheckError Class Reference

A geometry check error for a missing vertex. More...

#include <qgsgeometrymissingvertexcheck.h>

Inheritance diagram for QgsGeometryMissingVertexCheckError:
Inheritance graph
[legend]

Public Member Functions

 QgsGeometryMissingVertexCheckError (const QgsGeometryCheck *check, const QgsGeometryCheckerUtils::LayerFeature &layerFeature, const QgsPointXY &errorLocation, QgsVertexId vidx=QgsVertexId(), const QVariant &value=QVariant(), ValueType valueType=ValueOther)
 Create a new missing vertex check error. More...
 
QgsRectangle affectedAreaBBox () const override
 The bounding box of the affected area of the error. More...
 
QIcon icon () const override
 Returns an icon that should be shown for this kind of error. More...
 
QMap< QString, QgsFeatureIdsinvolvedFeatures () const override
 Returns a list of involved features. More...
 
void setAffectedAreaBBox (const QgsRectangle &affectedAreaBBox)
 Set the bounding box of the affected area. More...
 
void setInvolvedFeatures (const QMap< QString, QgsFeatureIds > &involvedFeatures)
 The two involved features, that share a common boundary but not all common vertices on this boundary. More...
 
- Public Member Functions inherited from QgsGeometryCheckError
 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 errorLocation. More...
 
virtual ~QgsGeometryCheckError ()=default
 
const QgsGeometryCheckcheck () const
 The geometry check that created this error. More...
 
virtual bool closeMatch (QgsGeometryCheckError *) const
 Check if this error is almost equal to other. More...
 
virtual QgsRectangle contextBoundingBox () const
 The context of the error. More...
 
virtual QString description () const
 The error description. More...
 
QgsFeatureId featureId () const
 The id of the feature on which this error has been detected. More...
 
QgsGeometry geometry () const
 The geometry of the error in map units. More...
 
virtual bool handleChanges (const QgsGeometryCheck::Changes &changes)
 Apply a list of changes. More...
 
virtual bool isEqual (QgsGeometryCheckError *other) const
 Check if this error is equal to other. More...
 
const QString & layerId () const
 The id of the layer on which this error has been detected. More...
 
const QgsPointXYlocation () const
 The location of the error in map units. More...
 
const QgsGeometryCheckErroroperator= (const QgsGeometryCheckError &)=delete
 
QString resolutionMessage () const
 A message with details, how the error has been resolved. More...
 
void setFixed (int method)
 Set the status to fixed and specify the method that has been used to fix the error. More...
 
void setFixFailed (const QString &reason)
 Set the error status to failed and specify the reason for failure. More...
 
void setObsolete ()
 Set the error status to obsolete. More...
 
Status status () const
 The status of the error. More...
 
virtual void update (const QgsGeometryCheckError *other)
 Update this error with the information from other. More...
 
QVariant value () const
 An additional value for the error. More...
 
ValueType valueType () const
 The type of the value. More...
 
const QgsVertexIdvidx () const
 The id of the affected vertex. More...
 

Additional Inherited Members

- Public Types inherited from QgsGeometryCheckError
enum  Status { StatusPending , StatusFixFailed , StatusFixed , StatusObsolete }
 The status of an error. More...
 
enum  ValueType { ValueLength , ValueArea , ValueOther }
 Describes the type of an error value. More...
 
- Protected Member Functions inherited from QgsGeometryCheckError
 QgsGeometryCheckError (const QgsGeometryCheck *check, const QString &layerId, QgsFeatureId featureId, const QgsGeometry &geometry, 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 layer with layerId and featureId. More...
 
- Protected Attributes inherited from QgsGeometryCheckError
const QgsGeometryCheckmCheck = nullptr
 
QgsPointXY mErrorLocation
 
QgsFeatureId mFeatureId
 
QgsGeometry mGeometry
 
QString mLayerId
 
QString mResolutionMessage
 
Status mStatus
 
QVariant mValue
 
ValueType mValueType
 
QgsVertexId mVidx
 

Detailed Description

A geometry check error for a missing vertex.

Includes additional details about the bounding box of the error, centered on the missing error location and scaled by taking neighbouring vertices into account.

Since
QGIS 3.8

Definition at line 37 of file qgsgeometrymissingvertexcheck.h.

Constructor & Destructor Documentation

◆ QgsGeometryMissingVertexCheckError()

private QgsGeometryMissingVertexCheckError::QgsGeometryMissingVertexCheckError ( const QgsGeometryCheck check,
const QgsGeometryCheckerUtils::LayerFeature layerFeature,
const QgsPointXY errorLocation,
QgsVertexId  vidx = QgsVertexId(),
const QVariant &  value = QVariant(),
QgsGeometryCheckError::ValueType  valueType = ValueOther 
)

Create a new missing vertex check error.

Definition at line 269 of file qgsgeometrymissingvertexcheck.cpp.

Member Function Documentation

◆ affectedAreaBBox()

QgsRectangle QgsGeometryMissingVertexCheckError::affectedAreaBBox ( ) const
overridevirtual

The bounding box of the affected area of the error.

Reimplemented from QgsGeometryCheckError.

Definition at line 274 of file qgsgeometrymissingvertexcheck.cpp.

◆ icon()

QIcon QgsGeometryMissingVertexCheckError::icon ( ) const
overridevirtual

Returns an icon that should be shown for this kind of error.

Since
QGIS 3.8

Reimplemented from QgsGeometryCheckError.

Definition at line 294 of file qgsgeometrymissingvertexcheck.cpp.

◆ involvedFeatures()

QMap< QString, QgsFeatureIds > QgsGeometryMissingVertexCheckError::involvedFeatures ( ) const
overridevirtual

Returns a list of involved features.

By default returns an empty map. The map keys are layer ids, the map value is a set of feature ids.

Since
QGIS 3.8

Reimplemented from QgsGeometryCheckError.

Definition at line 284 of file qgsgeometrymissingvertexcheck.cpp.

◆ setAffectedAreaBBox()

void QgsGeometryMissingVertexCheckError::setAffectedAreaBBox ( const QgsRectangle affectedAreaBBox)

Set the bounding box of the affected area.

Since
QGIS 3.8

Definition at line 279 of file qgsgeometrymissingvertexcheck.cpp.

◆ setInvolvedFeatures()

void QgsGeometryMissingVertexCheckError::setInvolvedFeatures ( const QMap< QString, QgsFeatureIds > &  involvedFeatures)

The two involved features, that share a common boundary but not all common vertices on this boundary.

Since
QGIS 3.8

Definition at line 289 of file qgsgeometrymissingvertexcheck.cpp.


The documentation for this class was generated from the following files: