QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
23 QList<QgsSingleGeometryCheckError *> errors;
25 for (
int iPart = 0, nParts = geom->
partCount(); iPart < nParts; ++iPart )
27 for (
int iRing = 0, nRings = geom->
ringCount( iPart ); iRing < nRings; ++iRing )
35 QVector<QgsPoint> ring;
38 for (
int i = 1; i < n; ++i )
52 if ( !ring.empty() && isClosed )
54 vtxMap.append( n - 1 );
55 ring.append( ring.front() );
60 for (
int iVert = 0, nVerts = n - isClosed; iVert < nVerts; ++iVert )
63 for (
int i = 0, j = 1; j < n; i = j++ )
65 if ( iVert == i || iVert == j || ( isClosed && iVert == 0 && j == n - 1 ) )
86 Q_UNUSED( featurePools )
99 static const QStringList methods = QStringList() << tr(
"No action" );
void setFixFailed(const QString &reason)
Set the error status to failed and specify the reason for failure.
Point geometry type, with support for z-dimension and m-values.
static QgsPoint projectPointOnSegment(const QgsPoint &p, const QgsPoint &s1, const QgsPoint &s2) SIP_HOLDGIL
Project the point on a segment.
QMap< QString, QMap< QgsFeatureId, QList< QgsGeometryCheck::Change > > > Changes
A collection of changes.
@ FeatureNodeCheck
The check controls individual nodes.
virtual int partCount() const =0
Returns count of parts contained in the geometry.
static double sqrDistance2D(const QgsPoint &pt1, const QgsPoint &pt2) SIP_HOLDGIL
Returns the squared 2D distance between two points.
An error from a QgsSingleGeometryCheck.
virtual int vertexCount(int part=0, int ring=0) const =0
Returns the number of vertices of which this geometry is built.
QgsPoint * clone() const override
Clones the geometry by performing a deep copy.
virtual QgsPoint vertexAt(QgsVertexId id) const =0
Returns the point corresponding to a specified vertex id.
void setFixed(int method)
Set the status to fixed and specify the method that has been used to fix the error.
const QgsAbstractGeometry * constGet() const SIP_HOLDGIL
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
Abstract base class for all geometries.
const QgsGeometryCheckContext * mContext
A geometry is the spatial representation of a feature.
CheckType
The type of a check.
Utility class for identifying a unique vertex within a geometry.
const double tolerance
The tolerance to allow for in geometry checks.
This represents an error reported by a geometry check.
virtual int ringCount(int part=0) const =0
Returns the number of rings of which this geometry is built.