QGIS API Documentation
3.6.0-Noosa (5873452)
|
This represents an error reported by a geometry check. More...
#include <qgsgeometrycheckerror.h>
Public Types | |
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... | |
Public Member Functions | |
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 |
virtual QgsRectangle | affectedAreaBBox () const |
The bounding box of the affected area of the error. More... | |
const QgsGeometryCheck * | check () 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 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 QgsPointXY & | location () const |
The location of the error in map units. More... | |
const QgsGeometryCheckError & | operator= (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 QgsVertexId & | vidx () const |
The id of the affected vertex. More... | |
Protected Member Functions | |
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 | |
const QgsGeometryCheck * | mCheck = nullptr |
QgsPointXY | mErrorLocation |
QgsFeatureId | mFeatureId |
QgsGeometry | mGeometry |
QString | mLayerId |
QString | mResolutionMessage |
Status | mStatus |
QVariant | mValue |
ValueType | mValueType |
QgsVertexId | mVidx |
This represents an error reported by a geometry check.
Definition at line 35 of file qgsgeometrycheckerror.h.
The status of an error.
Definition at line 42 of file qgsgeometrycheckerror.h.
Describes the type of an error value.
Enumerator | |
---|---|
ValueLength | The value is a length. |
ValueArea | The value is an area. |
ValueOther | The value if of another type. |
Definition at line 53 of file qgsgeometrycheckerror.h.
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.
Optionally the vertex can be specified via vixd and a value with its value Type for additional information.
Definition at line 39 of file qgsgeometrycheckerror.cpp.
|
virtualdefault |
|
protected |
Create a new geometry check error with the parent check and for the layer with layerId and featureId.
The geometry of the error and the errorLocation need to be specified in map coordinates. Optionally the vertex can be specified via vixd and a value with its value Type for additional information.
Definition at line 20 of file qgsgeometrycheckerror.cpp.
|
virtual |
The bounding box of the affected area of the error.
Reimplemented in QgsGeometryGapCheckError.
Definition at line 86 of file qgsgeometrycheckerror.cpp.
|
inline |
The geometry check that created this error.
Definition at line 80 of file qgsgeometrycheckerror.h.
|
virtual |
Check if this error is almost equal to other.
If this returns true, it can be used to update existing errors after re-checking.
Reimplemented in QgsGeometryOverlapCheckError, and QgsGeometryGapCheckError.
Definition at line 112 of file qgsgeometrycheckerror.cpp.
|
inlinevirtual |
The error description.
By default the description of the parent check will be returned.
Reimplemented in QgsGeometryOverlapCheckError.
Definition at line 106 of file qgsgeometrycheckerror.h.
|
inline |
The id of the feature on which this error has been detected.
Definition at line 90 of file qgsgeometrycheckerror.h.
QgsGeometry QgsGeometryCheckError::geometry | ( | ) | const |
The geometry of the error in map units.
Definition at line 81 of file qgsgeometrycheckerror.cpp.
|
virtual |
Apply a list of changes.
Reimplemented in QgsGeometryCheckErrorSingle, QgsGeometryOverlapCheckError, and QgsGeometryGapCheckError.
Definition at line 117 of file qgsgeometrycheckerror.cpp.
|
virtual |
Check if this error is equal to other.
Is reimplemented by subclasses with additional information, comparison of base information is done in parent class.
Reimplemented in QgsGeometryOverlapCheckError, QgsGeometryGapCheckError, QgsGeometryContainedCheckError, and QgsGeometryDuplicateCheckError.
Definition at line 104 of file qgsgeometrycheckerror.cpp.
|
inline |
The id of the layer on which this error has been detected.
Definition at line 85 of file qgsgeometrycheckerror.h.
|
inline |
The location of the error in map units.
Definition at line 111 of file qgsgeometrycheckerror.h.
|
delete |
|
inline |
A message with details, how the error has been resolved.
Definition at line 140 of file qgsgeometrycheckerror.h.
void QgsGeometryCheckError::setFixed | ( | int | method | ) |
Set the status to fixed and specify the method that has been used to fix the error.
Definition at line 91 of file qgsgeometrycheckerror.cpp.
void QgsGeometryCheckError::setFixFailed | ( | const QString & | reason | ) |
Set the error status to failed and specify the reason for failure.
Definition at line 98 of file qgsgeometrycheckerror.cpp.
|
inline |
Set the error status to obsolete.
Definition at line 156 of file qgsgeometrycheckerror.h.
|
inline |
The status of the error.
Definition at line 135 of file qgsgeometrycheckerror.h.
|
virtual |
Update this error with the information from other.
Will be used to update existing errors whenever they are re-checked.
Reimplemented in QgsGeometryGapCheckError.
Definition at line 183 of file qgsgeometrycheckerror.cpp.
|
inline |
An additional value for the error.
Lengths and areas are provided in map units.
Definition at line 118 of file qgsgeometrycheckerror.h.
|
inline |
|
inline |
The id of the affected vertex.
May be valid or not, depending on the check.
Definition at line 130 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 201 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 205 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 203 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 204 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 202 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 210 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 209 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 207 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 208 of file qgsgeometrycheckerror.h.
|
protected |
Definition at line 206 of file qgsgeometrycheckerror.h.