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 )
This class is a composition of two QSettings instances:
Use GEOS validation methods.
CheckType
The type of a check.
QgsWkbTypes::GeometryType geometryType() const
Returns point, line or polygon.
An error for a QgsGeometryIsValid check.
A geometry is the spatial representation of a feature.
Base class for geometry checks for a single geometry without any context of the layer or other layers...
Base configuration for geometry checks.
bool hasWhere() const
true if the location available from
QgsGeometryIsValidCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Creates a new is valid check with the provided context.
QString what() const
A human readable error message containing details about the error.
QgsGeometryIsValidCheckError(const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QString &errorDescription)
Creates a new is valid check error.
Use internal QgsGeometryValidator method.
QList< QgsWkbTypes::GeometryType > compatibleGeometryTypes() const override
A list of geometry types for which this check can be performed.
QList< QgsSingleGeometryCheckError * > processGeometry(const QgsGeometry &geometry) const override
Check the geometry for errors.
QString description() const override
A human readable description of this error.
QgsPointXY where() const
The coordinates at which the error is located and should be visualized.
An error from a QgsSingleGeometryCheck.
ValidationMethod
Available methods for validating geometries.
QStringList resolutionMethods() const override
Returns a list of descriptions for available resolutions for errors.
Represents a vector layer which manages a vector based data sets.
void errorFound(const QgsGeometry::Error &error)
Sent when an error has been found during the validation process.
This geometry check should be available in layer validation on the vector layer peroperties.
The check controls individual nodes.