28 return factoryCompatibleGeometryTypes();
33 QVector<QgsGeometry::Error> errors;
36 if (
QgsSettings().value( QStringLiteral(
"qgis/digitizing/validate_geometries" ), 1 ).toInt() == 2 )
43 errors.append( error );
49 QList<QgsSingleGeometryCheckError *> result;
50 for (
const auto &error : qgis::as_const( errors ) )
66 QList<QgsWkbTypes::GeometryType> QgsGeometryIsValidCheck::factoryCompatibleGeometryTypes()
73 return factoryCompatibleGeometryTypes().contains( layer->geometryType() );
76 QString QgsGeometryIsValidCheck::factoryDescription()
78 return tr(
"Is Valid" );
81 QString QgsGeometryIsValidCheck::factoryId()
83 return QStringLiteral(
"QgsIsValidCheck" );
86 QgsGeometryCheck::Flags QgsGeometryIsValidCheck::factoryFlags()
99 , mDescription( errorDescription )
Base configuration for geometry checks.
@ AvailableInValidation
This geometry check should be available in layer validation on the vector layer peroperties.
CheckType
The type of a check.
@ FeatureNodeCheck
The check controls individual nodes.
An error for a QgsGeometryIsValid check.
QgsGeometryIsValidCheckError(const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QString &errorDescription)
Creates a new is valid check error.
QString description() const override
A human readable description of this error.
Q_DECL_DEPRECATED QStringList resolutionMethods() const override
Returns a list of descriptions for available resolutions for errors.
QgsGeometryIsValidCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Creates a new is valid check with the provided context.
QList< QgsSingleGeometryCheckError * > processGeometry(const QgsGeometry &geometry) const override
Check the geometry for errors.
QList< QgsWkbTypes::GeometryType > compatibleGeometryTypes() const override
A list of geometry types for which this check can be performed.
void errorFound(const QgsGeometry::Error &error)
Sent when an error has been found during the validation process.
bool hasWhere() const
true if the location available from
QgsPointXY where() const
The coordinates at which the error is located and should be visualized.
QString what() const
A human readable error message containing details about the error.
A geometry is the spatial representation of a feature.
ValidationMethod
Available methods for validating geometries.
@ ValidatorQgisInternal
Use internal QgsGeometryValidator method.
@ ValidatorGeos
Use GEOS validation methods.
This class is a composition of two QSettings instances:
An error from a QgsSingleGeometryCheck.
Base class for geometry checks for a single geometry without any context of the layer or other layers...
Represents a vector layer which manages a vector based data sets.