QGIS API Documentation  3.19.0-Master (e8efe81642)
qgsgeometry.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgeometry.h - Geometry (stored as Open Geospatial Consortium WKB)
3  -------------------------------------------------------------------
4 Date : 02 May 2005
5 Copyright : (C) 2005 by Brendan Morley
6 email : morb at ozemail dot com dot au
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSGEOMETRY_H
17 #define QGSGEOMETRY_H
18 
19 #include <functional>
20 
21 #include <QDomDocument>
22 #include <QJsonObject>
23 #include <QSet>
24 #include <QString>
25 #include <QVector>
26 
27 #include <climits>
28 #include <limits>
29 #include <memory>
30 
31 #include "qgis_core.h"
32 #include "qgis_sip.h"
33 
34 #include "qgsabstractgeometry.h"
35 #include "qgspointxy.h"
36 #include "qgspoint.h"
37 #include "qgsfeatureid.h"
38 
39 #ifndef SIP_RUN
40 #include "json_fwd.hpp"
41 using namespace nlohmann;
42 #endif
43 
44 class QgsGeometryEngine;
45 class QgsVectorLayer;
46 class QgsMapToPixel;
47 class QPainter;
48 class QgsPolygon;
49 class QgsLineString;
50 class QgsCurve;
51 class QgsFeedback;
52 
62 typedef QVector<QgsPointXY> QgsPolylineXY;
63 
72 
74 #ifndef SIP_RUN
75 typedef QVector<QgsPolylineXY> QgsPolygonXY;
76 #else
77 typedef QVector<QVector<QgsPointXY>> QgsPolygonXY;
78 #endif
79 
81 typedef QVector<QgsPointXY> QgsMultiPointXY;
82 
84 #ifndef SIP_RUN
85 typedef QVector<QgsPolylineXY> QgsMultiPolylineXY;
86 #else
87 typedef QVector<QVector<QgsPointXY>> QgsMultiPolylineXY;
88 #endif
89 
91 #ifndef SIP_RUN
92 typedef QVector<QgsPolygonXY> QgsMultiPolygonXY;
93 #else
94 typedef QVector<QVector<QVector<QgsPointXY>>> QgsMultiPolygonXY;
95 #endif
96 
97 class QgsRectangle;
98 
99 class QgsConstWkbPtr;
100 
101 struct QgsGeometryPrivate;
102 
123 class CORE_EXPORT QgsGeometry
124 {
125  Q_GADGET
126  Q_PROPERTY( bool isNull READ isNull )
127  Q_PROPERTY( QgsWkbTypes::GeometryType type READ type )
128 
129  public:
130 
136  {
137  Success = 0,
138  NothingHappened = 1000,
145  /* Add part issues */
148  /* Add ring issues*/
153  /* Split features */
155  };
156  Q_ENUM( OperationResult )
157 
158 
160 
162  QgsGeometry( const QgsGeometry & );
163 
168  QgsGeometry &operator=( QgsGeometry const &rhs ) SIP_SKIP;
169 
175  explicit QgsGeometry( QgsAbstractGeometry *geom SIP_TRANSFER );
176 
182  explicit QgsGeometry( std::unique_ptr< QgsAbstractGeometry > geom ) SIP_SKIP;
183 
184  virtual ~QgsGeometry();
185 
197  const QgsAbstractGeometry *constGet() const SIP_HOLDGIL;
198 
211  QgsAbstractGeometry *get();
212 
225  void set( QgsAbstractGeometry *geometry SIP_TRANSFER ) SIP_DEPRECATED;
226 
234  bool isNull() const SIP_HOLDGIL;
235 
237  static QgsGeometry fromWkt( const QString &wkt );
239  static QgsGeometry fromPointXY( const QgsPointXY &point ) SIP_HOLDGIL;
241  static QgsGeometry fromMultiPointXY( const QgsMultiPointXY &multipoint );
242 
254  static QgsGeometry fromPolylineXY( const QgsPolylineXY &polyline );
255 
265  static QgsGeometry fromPolyline( const QgsPolyline &polyline );
266 
268  static QgsGeometry fromMultiPolylineXY( const QgsMultiPolylineXY &multiline );
270  static QgsGeometry fromPolygonXY( const QgsPolygonXY &polygon );
272  static QgsGeometry fromMultiPolygonXY( const QgsMultiPolygonXY &multipoly );
274  static QgsGeometry fromRect( const QgsRectangle &rect ) SIP_HOLDGIL;
276  static QgsGeometry collectGeometry( const QVector<QgsGeometry> &geometries );
277 
293  static QgsGeometry createWedgeBuffer( const QgsPoint &center, double azimuth, double angularWidth,
294  double outerRadius, double innerRadius = 0 );
295 
301  void fromWkb( unsigned char *wkb, int length ) SIP_SKIP;
302 
307  void fromWkb( const QByteArray &wkb );
308 
313  QgsWkbTypes::Type wkbType() const SIP_HOLDGIL;
314 
319  QgsWkbTypes::GeometryType type() const SIP_HOLDGIL;
320 
327  bool isEmpty() const;
328 
330  bool isMultipart() const SIP_HOLDGIL;
331 
346  bool equals( const QgsGeometry &geometry ) const;
347 
364  bool isGeosEqual( const QgsGeometry & ) const;
365 
368  {
369  FlagAllowSelfTouchingHoles = 1 << 0,
370  };
371  Q_DECLARE_FLAGS( ValidityFlags, ValidityFlag )
372 
373 
380  bool isGeosValid( QgsGeometry::ValidityFlags flags = QgsGeometry::ValidityFlags() ) const;
381 
390  bool isSimple() const;
391 
405  bool isAxisParallelRectangle( double maximumDeviation, bool simpleRectanglesOnly = false ) const;
406 
419  double area() const;
420 
433  double length() const;
434 
442  double distance( const QgsGeometry &geom ) const;
443 
444 #ifndef SIP_RUN
445 
446  // TODO QGIS 4: consider renaming vertices_begin, vertices_end, parts_begin, parts_end, etc
447  // to camelCase
448 
453  QgsAbstractGeometry::vertex_iterator vertices_begin() const;
454 
459  QgsAbstractGeometry::vertex_iterator vertices_end() const;
460 #endif
461 
485  QgsVertexIterator vertices() const;
486 
487 #ifndef SIP_RUN
488 
498 
508 
517  QgsAbstractGeometry::const_part_iterator const_parts_begin() const;
518 
527  QgsAbstractGeometry::const_part_iterator const_parts_end() const;
528 #endif
529 
567  QgsGeometryPartIterator parts();
568 
601  QgsGeometryConstPartIterator constParts() const;
602 
620  double hausdorffDistance( const QgsGeometry &geom ) const;
621 
640  double hausdorffDistanceDensify( const QgsGeometry &geom, double densifyFraction ) const;
641 
656  double frechetDistance( const QgsGeometry &geom ) const SIP_THROW( QgsNotSupportedException );
657 
680  double frechetDistanceDensify( const QgsGeometry &geom, double densifyFraction ) const SIP_THROW( QgsNotSupportedException );
681 
694  QgsPointXY closestVertex( const QgsPointXY &point, int &closestVertexIndex SIP_OUT, int &previousVertexIndex SIP_OUT, int &nextVertexIndex SIP_OUT, double &sqrDist SIP_OUT ) const;
695 
704  double distanceToVertex( int vertex ) const;
705 
713  double angleAtVertex( int vertex ) const;
714 
727  void adjacentVertices( int atVertex, int &beforeVertex SIP_OUT, int &afterVertex SIP_OUT ) const;
728 
741  bool insertVertex( double x, double y, int beforeVertex );
742 
755  bool insertVertex( const QgsPoint &point, int beforeVertex );
756 
764  bool moveVertex( double x, double y, int atVertex );
765 
773  bool moveVertex( const QgsPoint &p, int atVertex );
774 
786  bool deleteVertex( int atVertex );
787 
793  QgsPoint vertexAt( int atVertex ) const;
794 
800  double sqrDistToVertexAt( QgsPointXY &point SIP_IN, int atVertex ) const;
801 
807  QgsGeometry nearestPoint( const QgsGeometry &other ) const;
808 
819  QgsGeometry shortestLine( const QgsGeometry &other ) const;
820 
827  double closestVertexWithContext( const QgsPointXY &point, int &atVertex SIP_OUT ) const;
828 
840  double closestSegmentWithContext( const QgsPointXY &point, QgsPointXY &minDistPoint SIP_OUT, int &nextVertexIndex SIP_OUT, int *leftOrRightOfSegment SIP_OUT = nullptr, double epsilon = DEFAULT_SEGMENT_EPSILON ) const;
841 
847  OperationResult addRing( const QVector<QgsPointXY> &ring );
848 
854  OperationResult addRing( QgsCurve *ring SIP_TRANSFER );
855 
862  OperationResult addPart( const QVector<QgsPointXY> &points, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry ) SIP_PYNAME( addPointsXY );
863 
870  OperationResult addPart( const QgsPointSequence &points, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry ) SIP_PYNAME( addPoints );
871 
878  OperationResult addPart( QgsAbstractGeometry *part SIP_TRANSFER, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry );
879 
885  OperationResult addPart( const QgsGeometry &newPart ) SIP_PYNAME( addPartGeometry );
886 
893  QgsGeometry removeInteriorRings( double minimumAllowedArea = -1 ) const;
894 
899  OperationResult translate( double dx, double dy, double dz = 0.0, double dm = 0.0 );
900 
915  OperationResult transform( const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection direction = QgsCoordinateTransform::ForwardTransform, bool transformZ = false ) SIP_THROW( QgsCsException );
916 
925  OperationResult transform( const QTransform &t, double zTranslate = 0.0, double zScale = 1.0, double mTranslate = 0.0, double mScale = 1.0 );
926 
933  OperationResult rotate( double rotation, const QgsPointXY &center );
934 
945  Q_DECL_DEPRECATED OperationResult splitGeometry( const QVector<QgsPointXY> &splitLine, QVector<QgsGeometry> &newGeometries SIP_OUT, bool topological, QVector<QgsPointXY> &topologyTestPoints SIP_OUT, bool splitFeature = true ) SIP_DEPRECATED;
946 
969  OperationResult splitGeometry( const QgsPointSequence &splitLine, QVector<QgsGeometry> &newGeometries SIP_OUT, bool topological, QgsPointSequence &topologyTestPoints SIP_OUT, bool splitFeature = true, bool skipIntersectionTest SIP_PYARGREMOVE = false );
970 
982  OperationResult splitGeometry( const QgsCurve *curve, QVector<QgsGeometry> &newGeometries SIP_OUT, bool preserveCircular, bool topological, QgsPointSequence &topologyTestPoints SIP_OUT, bool splitFeature = true );
983 
988  OperationResult reshapeGeometry( const QgsLineString &reshapeLineString );
989 
995  int makeDifferenceInPlace( const QgsGeometry &other ) SIP_SKIP;
996 
1004  QgsGeometry makeDifference( const QgsGeometry &other ) const;
1005 
1010  QgsRectangle boundingBox() const;
1011 
1023  QgsGeometry orientedMinimumBoundingBox( double &area SIP_OUT, double &angle SIP_OUT, double &width SIP_OUT, double &height SIP_OUT ) const;
1024 
1034  QgsGeometry orientedMinimumBoundingBox() const SIP_SKIP;
1035 
1044  QgsGeometry minimalEnclosingCircle( QgsPointXY &center SIP_OUT, double &radius SIP_OUT, unsigned int segments = 36 ) const;
1045 
1051  QgsGeometry minimalEnclosingCircle( unsigned int segments = 36 ) const SIP_SKIP;
1052 
1061  QgsGeometry orthogonalize( double tolerance = 1.0E-8, int maxIterations = 1000, double angleThreshold = 15.0 ) const;
1062 
1075  QgsGeometry snappedToGrid( double hSpacing, double vSpacing, double dSpacing = 0, double mSpacing = 0 ) const;
1076 
1097  bool removeDuplicateNodes( double epsilon = 4 * std::numeric_limits<double>::epsilon(), bool useZValues = false );
1098 
1108  bool intersects( const QgsRectangle &rectangle ) const;
1109 
1119  bool intersects( const QgsGeometry &geometry ) const;
1120 
1130  bool boundingBoxIntersects( const QgsRectangle &rectangle ) const;
1131 
1141  bool boundingBoxIntersects( const QgsGeometry &geometry ) const;
1142 
1146  bool contains( const QgsPointXY *p ) const;
1147 
1152  bool contains( const QgsGeometry &geometry ) const;
1153 
1158  bool disjoint( const QgsGeometry &geometry ) const;
1159 
1164  bool touches( const QgsGeometry &geometry ) const;
1165 
1170  bool overlaps( const QgsGeometry &geometry ) const;
1171 
1176  bool within( const QgsGeometry &geometry ) const;
1177 
1178 
1183  bool crosses( const QgsGeometry &geometry ) const;
1184 
1187  {
1188  SideLeft = 0,
1190  };
1191  Q_ENUM( BufferSide )
1192 
1193 
1195  {
1196  CapRound = 1,
1199  };
1200  Q_ENUM( EndCapStyle )
1201 
1202 
1204  {
1205  JoinStyleRound = 1,
1208  };
1209  Q_ENUM( JoinStyle )
1210 
1211 
1218  QgsGeometry buffer( double distance, int segments ) const;
1219 
1232  QgsGeometry buffer( double distance, int segments, EndCapStyle endCapStyle, JoinStyle joinStyle, double miterLimit ) const;
1233 
1242  QgsGeometry offsetCurve( double distance, int segments, JoinStyle joinStyle, double miterLimit ) const;
1243 
1259  QgsGeometry singleSidedBuffer( double distance, int segments, BufferSide side,
1260  JoinStyle joinStyle = JoinStyleRound,
1261  double miterLimit = 2.0 ) const;
1262 
1280  QgsGeometry taperedBuffer( double startWidth, double endWidth, int segments ) const;
1281 
1296  QgsGeometry variableWidthBufferByM( int segments ) const;
1297 
1304  QgsGeometry extendLine( double startDistance, double endDistance ) const;
1305 
1307  QgsGeometry simplify( double tolerance ) const;
1308 
1318  QgsGeometry densifyByCount( int extraNodesPerSegment ) const;
1319 
1334  QgsGeometry densifyByDistance( double distance ) const;
1335 
1351  QgsGeometry convertToCurves( double distanceTolerance = 1e-8, double angleTolerance = 1e-8 ) const;
1352 
1366  QgsGeometry centroid() const;
1367 
1381  QgsGeometry pointOnSurface() const;
1382 
1395  QgsGeometry poleOfInaccessibility( double precision, double *distanceToBoundary SIP_OUT = nullptr ) const;
1396 
1420  QgsGeometry largestEmptyCircle( double tolerance, const QgsGeometry &boundary = QgsGeometry() ) const SIP_THROW( QgsNotSupportedException );
1421 
1436  QgsGeometry minimumWidth() const SIP_THROW( QgsNotSupportedException );
1437 
1459  double minimumClearance() const SIP_THROW( QgsNotSupportedException );
1460 
1472  QgsGeometry minimumClearanceLine() const SIP_THROW( QgsNotSupportedException );
1473 
1482  QgsGeometry convexHull() const;
1483 
1499  QgsGeometry voronoiDiagram( const QgsGeometry &extent = QgsGeometry(), double tolerance = 0.0, bool edgesOnly = false ) const;
1500 
1510  QgsGeometry delaunayTriangulation( double tolerance = 0.0, bool edgesOnly = false ) const;
1511 
1522  QgsGeometry node() const;
1523 
1538  QgsGeometry sharedPaths( const QgsGeometry &other ) const;
1539 
1559  QgsGeometry subdivide( int maxNodes = 256 ) const;
1560 
1576  QgsGeometry interpolate( double distance ) const;
1577 
1589  double lineLocatePoint( const QgsGeometry &point ) const;
1590 
1600  double interpolateAngle( double distance ) const;
1601 
1610  QgsGeometry intersection( const QgsGeometry &geometry ) const;
1611 
1619  QgsGeometry clipped( const QgsRectangle &rectangle );
1620 
1632  QgsGeometry combine( const QgsGeometry &geometry ) const;
1633 
1642  QgsGeometry mergeLines() const;
1643 
1652  QgsGeometry difference( const QgsGeometry &geometry ) const;
1653 
1662  QgsGeometry symDifference( const QgsGeometry &geometry ) const;
1663 
1665  QgsGeometry extrude( double x, double y );
1666 
1667 #ifndef SIP_RUN
1668 
1690  QVector< QgsPointXY > randomPointsInPolygon( int count, const std::function< bool( const QgsPointXY & ) > &acceptPoint, unsigned long seed = 0, QgsFeedback *feedback = nullptr, int maxTriesPerPoint = 0 ) const;
1691 
1705  QVector< QgsPointXY > randomPointsInPolygon( int count, unsigned long seed = 0, QgsFeedback *feedback = nullptr ) const;
1707 #else
1708 
1722  SIP_PYOBJECT randomPointsInPolygon( int count, unsigned long seed = 0 ) const SIP_TYPEHINT( QgsPolylineXY );
1723  % MethodCode
1724  const QgsWkbTypes::GeometryType type = sipCpp->type();
1725  if ( sipCpp->isNull() )
1726  {
1727  PyErr_SetString( PyExc_ValueError, QStringLiteral( "Cannot generate points inside a null geometry." ).toUtf8().constData() );
1728  sipIsErr = 1;
1729  }
1730  else if ( type != QgsWkbTypes::PolygonGeometry )
1731  {
1732  PyErr_SetString( PyExc_TypeError, QStringLiteral( "Cannot generate points inside a %1 geometry. Only Polygon types are permitted." ).arg( QgsWkbTypes::displayString( sipCpp->wkbType() ) ).toUtf8().constData() );
1733  sipIsErr = 1;
1734  }
1735  else
1736  {
1737  const sipTypeDef *qvector_type = sipFindType( "QVector<QgsPointXY>" );
1738  sipRes = sipConvertFromNewType( new QVector< QgsPointXY >( sipCpp->randomPointsInPolygon( a0, a1 ) ), qvector_type, Py_None );
1739  }
1740  % End
1741 
1742 
1743 #endif
1745 
1753  int wkbSize( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
1754 
1762  QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
1763 
1769  QString asWkt( int precision = 17 ) const;
1770 
1771 #ifdef SIP_RUN
1772  SIP_PYOBJECT __repr__();
1773  % MethodCode
1774  QString str;
1775  if ( sipCpp->isNull() )
1776  str = QStringLiteral( "<QgsGeometry: null>" );
1777  else
1778  {
1779  QString wkt = sipCpp->asWkt();
1780  if ( wkt.length() > 1000 )
1781  wkt = wkt.left( 1000 ) + QStringLiteral( "..." );
1782  str = QStringLiteral( "<QgsGeometry: %1>" ).arg( wkt );
1783  }
1784  sipRes = PyUnicode_FromString( str.toUtf8().constData() );
1785  % End
1786 #endif
1787 
1791  QString asJson( int precision = 17 ) const;
1792 
1798  virtual json asJsonObject( int precision = 17 ) const SIP_SKIP;
1799 
1822  QVector< QgsGeometry > coerceToType( QgsWkbTypes::Type type ) const;
1823 
1836  QgsGeometry convertToType( QgsWkbTypes::GeometryType destType, bool destMultipart = false ) const;
1837 
1838  /* Accessor functions for getting geometry data */
1839 
1840 #ifndef SIP_RUN
1841 
1849  QgsPointXY asPoint() const;
1850 #else
1851 
1862  SIP_PYOBJECT asPoint() const SIP_TYPEHINT( QgsPointXY );
1863  % MethodCode
1864  const QgsWkbTypes::Type type = sipCpp->wkbType();
1865  if ( sipCpp->isNull() )
1866  {
1867  PyErr_SetString( PyExc_ValueError, QStringLiteral( "Null geometry cannot be converted to a point." ).toUtf8().constData() );
1868  sipIsErr = 1;
1869  }
1870  else if ( QgsWkbTypes::flatType( type ) != QgsWkbTypes::Point )
1871  {
1872  PyErr_SetString( PyExc_TypeError, QStringLiteral( "%1 geometry cannot be converted to a point. Only Point types are permitted." ).arg( QgsWkbTypes::displayString( type ) ).toUtf8().constData() );
1873  sipIsErr = 1;
1874  }
1875  else
1876  {
1877  sipRes = sipConvertFromNewType( new QgsPointXY( sipCpp->asPoint() ), sipType_QgsPointXY, Py_None );
1878  }
1879  % End
1880 #endif
1881 
1882 #ifndef SIP_RUN
1883 
1892  QgsPolylineXY asPolyline() const;
1893 #else
1894 
1906  SIP_PYOBJECT asPolyline() const SIP_TYPEHINT( QgsPolylineXY );
1907  % MethodCode
1908  const QgsWkbTypes::Type type = sipCpp->wkbType();
1909  if ( sipCpp->isNull() )
1910  {
1911  PyErr_SetString( PyExc_ValueError, QStringLiteral( "Null geometry cannot be converted to a polyline." ).toUtf8().constData() );
1912  sipIsErr = 1;
1913  }
1915  {
1916  PyErr_SetString( PyExc_TypeError, QStringLiteral( "%1 geometry cannot be converted to a polyline. Only single line or curve types are permitted." ).arg( QgsWkbTypes::displayString( type ) ).toUtf8().constData() );
1917  sipIsErr = 1;
1918  }
1919  else
1920  {
1921  const sipTypeDef *qvector_type = sipFindType( "QVector< QgsPointXY >" );
1922  sipRes = sipConvertFromNewType( new QgsPolylineXY( sipCpp->asPolyline() ), qvector_type, Py_None );
1923  }
1924  % End
1925 #endif
1926 
1927 #ifndef SIP_RUN
1928 
1937  QgsPolygonXY asPolygon() const;
1938 #else
1939 
1951  SIP_PYOBJECT asPolygon() const SIP_TYPEHINT( QgsPolygonXY );
1952  % MethodCode
1953  const QgsWkbTypes::Type type = sipCpp->wkbType();
1954  if ( sipCpp->isNull() )
1955  {
1956  PyErr_SetString( PyExc_ValueError, QStringLiteral( "Null geometry cannot be converted to a polygon." ).toUtf8().constData() );
1957  sipIsErr = 1;
1958  }
1960  {
1961  PyErr_SetString( PyExc_TypeError, QStringLiteral( "%1 geometry cannot be converted to a polygon. Only single polygon or curve polygon types are permitted." ).arg( QgsWkbTypes::displayString( type ) ).toUtf8().constData() );
1962  sipIsErr = 1;
1963  }
1964  else
1965  {
1966  const sipTypeDef *qvector_type = sipFindType( "QVector<QVector<QgsPointXY>>" );
1967  sipRes = sipConvertFromNewType( new QgsPolygonXY( sipCpp->asPolygon() ), qvector_type, Py_None );
1968  }
1969  % End
1970 #endif
1971 
1972 #ifndef SIP_RUN
1973 
1981  QgsMultiPointXY asMultiPoint() const;
1982 #else
1983 
1994  SIP_PYOBJECT asMultiPoint() const SIP_TYPEHINT( QgsMultiPointXY );
1995  % MethodCode
1996  const QgsWkbTypes::Type type = sipCpp->wkbType();
1997  if ( sipCpp->isNull() )
1998  {
1999  PyErr_SetString( PyExc_ValueError, QStringLiteral( "Null geometry cannot be converted to a multipoint." ).toUtf8().constData() );
2000  sipIsErr = 1;
2001  }
2003  {
2004  PyErr_SetString( PyExc_TypeError, QStringLiteral( "%1 geometry cannot be converted to a multipoint. Only multipoint types are permitted." ).arg( QgsWkbTypes::displayString( type ) ).toUtf8().constData() );
2005  sipIsErr = 1;
2006  }
2007  else
2008  {
2009  const sipTypeDef *qvector_type = sipFindType( "QVector< QgsPointXY >" );
2010  sipRes = sipConvertFromNewType( new QgsPolylineXY( sipCpp->asMultiPoint() ), qvector_type, Py_None );
2011  }
2012  % End
2013 #endif
2014 
2015 #ifndef SIP_RUN
2016 
2025  QgsMultiPolylineXY asMultiPolyline() const;
2026 #else
2027 
2039  SIP_PYOBJECT asMultiPolyline() const SIP_TYPEHINT( QgsMultiPolylineXY );
2040  % MethodCode
2041  const QgsWkbTypes::Type type = sipCpp->wkbType();
2042  if ( sipCpp->isNull() )
2043  {
2044  PyErr_SetString( PyExc_ValueError, QStringLiteral( "Null geometry cannot be converted to a multilinestring." ).toUtf8().constData() );
2045  sipIsErr = 1;
2046  }
2048  {
2049  PyErr_SetString( PyExc_TypeError, QStringLiteral( "%1 geometry cannot be converted to a multilinestring. Only multi linestring or curves are permitted." ).arg( QgsWkbTypes::displayString( type ) ).toUtf8().constData() );
2050  sipIsErr = 1;
2051  }
2052  else
2053  {
2054  const sipTypeDef *qvector_type = sipFindType( "QVector<QVector<QgsPointXY>>" );
2055  sipRes = sipConvertFromNewType( new QgsMultiPolylineXY( sipCpp->asMultiPolyline() ), qvector_type, Py_None );
2056  }
2057  % End
2058 #endif
2059 
2060 #ifndef SIP_RUN
2061 
2070  QgsMultiPolygonXY asMultiPolygon() const;
2071 #else
2072 
2084  SIP_PYOBJECT asMultiPolygon() const SIP_TYPEHINT( QgsMultiPolygonXY );
2085  % MethodCode
2086  const QgsWkbTypes::Type type = sipCpp->wkbType();
2087  if ( sipCpp->isNull() )
2088  {
2089  PyErr_SetString( PyExc_ValueError, QStringLiteral( "Null geometry cannot be converted to a multipolygon." ).toUtf8().constData() );
2090  sipIsErr = 1;
2091  }
2093  {
2094  PyErr_SetString( PyExc_TypeError, QStringLiteral( "%1 geometry cannot be converted to a multipolygon. Only multi polygon or curves are permitted." ).arg( QgsWkbTypes::displayString( type ) ).toUtf8().constData() );
2095  sipIsErr = 1;
2096  }
2097  else
2098  {
2099  const sipTypeDef *qvector_type = sipFindType( "QVector<QVector<QVector<QgsPointXY>>>" );
2100  sipRes = sipConvertFromNewType( new QgsMultiPolygonXY( sipCpp->asMultiPolygon() ), qvector_type, Py_None );
2101  }
2102  % End
2103 #endif
2104 
2109  QVector<QgsGeometry> asGeometryCollection() const;
2110 
2116  QPointF asQPointF() const SIP_HOLDGIL;
2117 
2130  QPolygonF asQPolygonF() const SIP_HOLDGIL;
2131 
2138  bool deleteRing( int ringNum, int partNum = 0 );
2139 
2145  bool deletePart( int partNum );
2146 
2155  bool convertToMultiType();
2156 
2166  bool convertToSingleType();
2167 
2177  bool convertGeometryCollectionToSubclass( QgsWkbTypes::GeometryType geomType );
2178 
2189  int avoidIntersections( const QList<QgsVectorLayer *> &avoidIntersectionsLayers,
2190  const QHash<QgsVectorLayer *, QSet<QgsFeatureId> > &ignoreFeatures SIP_PYARGREMOVE = ( QHash<QgsVectorLayer *, QSet<QgsFeatureId> >() ) );
2191 
2212  QgsGeometry makeValid() const;
2213 
2221  QgsGeometry forceRHR() const;
2222 
2227  class CORE_EXPORT Error
2228  {
2229  public:
2231  : mMessage( QStringLiteral( "none" ) )
2232  {}
2233 
2234  explicit Error( const QString &m )
2235  : mMessage( m )
2236  {}
2237 
2238  Error( const QString &m, const QgsPointXY &p )
2239  : mMessage( m )
2240  , mLocation( p )
2241  , mHasLocation( true ) {}
2242 
2246  QString what() const;
2247 
2251  QgsPointXY where() const;
2252 
2256  bool hasWhere() const;
2257 
2258 #ifdef SIP_RUN
2259  SIP_PYOBJECT __repr__();
2260  % MethodCode
2261  QString str = QStringLiteral( "<QgsGeometry.Error: %1>" ).arg( sipCpp->what() );
2262  sipRes = PyUnicode_FromString( str.toUtf8().data() );
2263  % End
2264 #endif
2265 
2266  bool operator==( const QgsGeometry::Error &other ) const
2267  {
2268  return other.mMessage == mMessage && other.mHasLocation == mHasLocation && other.mLocation == mLocation;
2269  }
2270 
2271  private:
2272  QString mMessage;
2273  QgsPointXY mLocation;
2274  bool mHasLocation = false;
2275  };
2276 
2282  {
2285  };
2286 
2295  void validateGeometry( QVector<QgsGeometry::Error> &errors SIP_OUT, ValidationMethod method = ValidatorQgisInternal, QgsGeometry::ValidityFlags flags = QgsGeometry::ValidityFlags() ) const;
2296 
2306  void normalize();
2307 
2313  static QgsGeometry unaryUnion( const QVector<QgsGeometry> &geometries );
2314 
2323  static QgsGeometry polygonize( const QVector<QgsGeometry> &geometries );
2324 
2332  void convertToStraightSegment( double tolerance = M_PI / 180., QgsAbstractGeometry::SegmentationToleranceType toleranceType = QgsAbstractGeometry::MaximumAngle );
2333 
2340  bool requiresConversionToStraightSegments() const;
2341 
2347  void mapToPixel( const QgsMapToPixel &mtp );
2348 
2354  void draw( QPainter &p ) const;
2355 
2366  bool vertexIdFromVertexNr( int number, QgsVertexId &id SIP_OUT ) const;
2367 
2379  int vertexNrFromVertexId( QgsVertexId id ) const;
2380 
2388  QString lastError() const SIP_HOLDGIL;
2389 
2399  void filterVertices( const std::function< bool( const QgsPoint & ) > &filter ) SIP_SKIP;
2400 
2415  void transformVertices( const std::function< QgsPoint( const QgsPoint & ) > &transform ) SIP_SKIP;
2416 
2422  static QgsGeometry fromQPointF( QPointF point ) SIP_HOLDGIL;
2423 
2431  static QgsGeometry fromQPolygonF( const QPolygonF &polygon );
2432 
2440  Q_DECL_DEPRECATED static QgsPolylineXY createPolylineFromQPolygonF( const QPolygonF &polygon ) SIP_DEPRECATED;
2441 
2449  Q_DECL_DEPRECATED static QgsPolygonXY createPolygonFromQPolygonF( const QPolygonF &polygon ) SIP_DEPRECATED;
2450 
2451 #ifndef SIP_RUN
2452 
2462  static bool compare( const QgsPolylineXY &p1, const QgsPolylineXY &p2,
2463  double epsilon = 4 * std::numeric_limits<double>::epsilon() );
2464 
2474  static bool compare( const QgsPolygonXY &p1, const QgsPolygonXY &p2,
2475  double epsilon = 4 * std::numeric_limits<double>::epsilon() );
2476 
2487  static bool compare( const QgsMultiPolygonXY &p1, const QgsMultiPolygonXY &p2,
2488  double epsilon = 4 * std::numeric_limits<double>::epsilon() );
2489 #else
2490 
2510  static bool compare( PyObject *obj1, PyObject *obj2, double epsilon = 4 * std::numeric_limits<double>::epsilon() );
2511  % MethodCode
2512  {
2513  sipRes = false;
2514  int state0;
2515  int state1;
2516  int sipIsErr = 0;
2517 
2518  if ( PyList_Check( a0 ) && PyList_Check( a1 ) &&
2519  PyList_GET_SIZE( a0 ) && PyList_GET_SIZE( a1 ) )
2520  {
2521  PyObject *o0 = PyList_GetItem( a0, 0 );
2522  PyObject *o1 = PyList_GetItem( a1, 0 );
2523  if ( o0 && o1 )
2524  {
2525  // compare polyline - polyline
2526  if ( sipCanConvertToType( o0, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2527  sipCanConvertToType( o1, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2528  sipCanConvertToType( a0, sipType_QVector_0100QgsPointXY, SIP_NOT_NONE ) &&
2529  sipCanConvertToType( a1, sipType_QVector_0100QgsPointXY, SIP_NOT_NONE ) )
2530  {
2531  QgsPolylineXY *p0;
2532  QgsPolylineXY *p1;
2533  p0 = reinterpret_cast<QgsPolylineXY *>( sipConvertToType( a0, sipType_QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
2534  p1 = reinterpret_cast<QgsPolylineXY *>( sipConvertToType( a1, sipType_QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
2535  if ( sipIsErr )
2536  {
2537  sipReleaseType( p0, sipType_QVector_0100QgsPointXY, state0 );
2538  sipReleaseType( p1, sipType_QVector_0100QgsPointXY, state1 );
2539  }
2540  else
2541  {
2542  sipRes = QgsGeometry::compare( *p0, *p1, a2 );
2543  }
2544  }
2545  else if ( PyList_Check( o0 ) && PyList_Check( o1 ) &&
2546  PyList_GET_SIZE( o0 ) && PyList_GET_SIZE( o1 ) )
2547  {
2548  PyObject *oo0 = PyList_GetItem( o0, 0 );
2549  PyObject *oo1 = PyList_GetItem( o1, 0 );
2550  if ( oo0 && oo1 )
2551  {
2552  // compare polygon - polygon
2553  if ( sipCanConvertToType( oo0, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2554  sipCanConvertToType( oo1, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2555  sipCanConvertToType( a0, sipType_QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) &&
2556  sipCanConvertToType( a1, sipType_QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) )
2557  {
2558  QgsPolygonXY *p0;
2559  QgsPolygonXY *p1;
2560  p0 = reinterpret_cast<QgsPolygonXY *>( sipConvertToType( a0, sipType_QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
2561  p1 = reinterpret_cast<QgsPolygonXY *>( sipConvertToType( a1, sipType_QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
2562  if ( sipIsErr )
2563  {
2564  sipReleaseType( p0, sipType_QVector_0600QVector_0100QgsPointXY, state0 );
2565  sipReleaseType( p1, sipType_QVector_0600QVector_0100QgsPointXY, state1 );
2566  }
2567  else
2568  {
2569  sipRes = QgsGeometry::compare( *p0, *p1, a2 );
2570  }
2571  }
2572  else if ( PyList_Check( oo0 ) && PyList_Check( oo1 ) &&
2573  PyList_GET_SIZE( oo0 ) && PyList_GET_SIZE( oo1 ) )
2574  {
2575  PyObject *ooo0 = PyList_GetItem( oo0, 0 );
2576  PyObject *ooo1 = PyList_GetItem( oo1, 0 );
2577  if ( ooo0 && ooo1 )
2578  {
2579  // compare multipolygon - multipolygon
2580  if ( sipCanConvertToType( ooo0, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2581  sipCanConvertToType( ooo1, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2582  sipCanConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) &&
2583  sipCanConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) )
2584  {
2585  QgsMultiPolygonXY *p0;
2586  QgsMultiPolygonXY *p1;
2587  p0 = reinterpret_cast<QgsMultiPolygonXY *>( sipConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
2588  p1 = reinterpret_cast<QgsMultiPolygonXY *>( sipConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
2589  if ( sipIsErr )
2590  {
2591  sipReleaseType( p0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, state0 );
2592  sipReleaseType( p1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, state1 );
2593  }
2594  else
2595  {
2596  sipRes = QgsGeometry::compare( *p0, *p1, a2 );
2597  }
2598  }
2599  }
2600  }
2601  }
2602  }
2603  }
2604  }
2605  }
2606  % End
2607 #endif
2608 
2625  QgsGeometry smooth( unsigned int iterations = 1, double offset = 0.25,
2626  double minimumDistance = -1.0, double maxAngle = 180.0 ) const;
2627 
2631  static QgsGeometryEngine *createGeometryEngine( const QgsAbstractGeometry *geometry ) SIP_FACTORY;
2632 
2638  static void convertPointList( const QVector<QgsPointXY> &input, QgsPointSequence &output );
2639 
2645  static void convertPointList( const QgsPointSequence &input, QVector<QgsPointXY> &output );
2646 
2648  operator QVariant() const
2649  {
2650  return QVariant::fromValue( *this );
2651  }
2652 
2653  private:
2654 
2655  QgsGeometryPrivate *d; //implicitly shared data pointer
2656 
2658  mutable QString mLastError;
2659 
2664  void detach();
2665 
2670  void reset( std::unique_ptr< QgsAbstractGeometry > newGeometry );
2671 
2672  static void convertPolygon( const QgsPolygon &input, QgsPolygonXY &output );
2673 
2675  QgsGeometry convertToPoint( bool destMultipart ) const;
2677  QgsGeometry convertToLine( bool destMultipart ) const;
2679  QgsGeometry convertToPolygon( bool destMultipart ) const;
2680 
2692  std::unique_ptr< QgsLineString > smoothLine( const QgsLineString &line, unsigned int iterations = 1, double offset = 0.25,
2693  double minimumDistance = -1, double maxAngle = 180.0 ) const;
2694 
2706  std::unique_ptr< QgsPolygon > smoothPolygon( const QgsPolygon &polygon, unsigned int iterations = 1, double offset = 0.25,
2707  double minimumDistance = -1, double maxAngle = 180.0 ) const;
2708 
2709 
2711 
2712 }; // class QgsGeometry
2713 
2715 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsGeometry::ValidityFlags )
2716 
2717 CORE_EXPORT QDataStream &operator<<( QDataStream &out, const QgsGeometry &geometry );
2720 CORE_EXPORT QDataStream &operator>>( QDataStream &in, QgsGeometry &geometry );
2721 
2722 #endif
The part_iterator class provides STL-style iterator for const references to geometry parts.
The part_iterator class provides STL-style iterator for geometry parts.
The vertex_iterator class provides STL-style iterator for vertices.
Abstract base class for all geometries.
SegmentationToleranceType
Segmentation tolerance as maximum angle or maximum difference between approximation and circle.
@ MaximumAngle
Maximum angle between generating radii (lines from arc center to output vertices)
A const WKB pointer.
Definition: qgswkbptr.h:138
Class for doing transforms between two map coordinate systems.
TransformDirection
Enum used to indicate the direction (forward or inverse) of the transform.
@ ForwardTransform
Transform from source to destination CRS.
Custom exception class for Coordinate Reference System related exceptions.
Definition: qgsexception.h:66
Abstract base class for curved geometry type.
Definition: qgscurve.h:36
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:45
Java-style iterator for const traversal of parts of a geometry.
Contains geometry relation and modification algorithms.
Java-style iterator for traversal of parts of a geometry.
A geometry error.
Definition: qgsgeometry.h:2228
Error(const QString &m)
Definition: qgsgeometry.h:2234
Error(const QString &m, const QgsPointXY &p)
Definition: qgsgeometry.h:2238
bool operator==(const QgsGeometry::Error &other) const
Definition: qgsgeometry.h:2266
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:124
QVector< QgsPointXY > randomPointsInPolygon(int count, const std::function< bool(const QgsPointXY &) > &acceptPoint, unsigned long seed=0, QgsFeedback *feedback=nullptr, int maxTriesPerPoint=0) const
Returns a list of count random points generated inside a (multi)polygon geometry (if acceptPoint is s...
JoinStyle
Join styles for buffers.
Definition: qgsgeometry.h:1204
@ JoinStyleMiter
Use mitered joins.
Definition: qgsgeometry.h:1206
@ JoinStyleBevel
Use beveled joins.
Definition: qgsgeometry.h:1207
QVector< QgsPointXY > randomPointsInPolygon(int count, unsigned long seed=0, QgsFeedback *feedback=nullptr) const
Returns a list of count random points generated inside a (multi)polygon geometry.
static bool compare(const QgsPolylineXY &p1, const QgsPolylineXY &p2, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compares two polylines for equality within a specified tolerance.
BufferSide
Side of line to buffer.
Definition: qgsgeometry.h:1187
@ SideRight
Buffer to right of line.
Definition: qgsgeometry.h:1189
EndCapStyle
End cap styles for buffers.
Definition: qgsgeometry.h:1195
@ CapSquare
Square cap (extends past start/end of line by buffer distance)
Definition: qgsgeometry.h:1198
@ CapFlat
Flat cap (in line with start/end of line)
Definition: qgsgeometry.h:1197
OperationResult
Success or failure of a geometry operation.
Definition: qgsgeometry.h:136
@ InvalidBaseGeometry
The base geometry on which the operation is done is invalid or empty.
Definition: qgsgeometry.h:139
@ SplitCannotSplitPoint
Cannot split points.
Definition: qgsgeometry.h:154
@ AddRingNotInExistingFeature
The input ring doesn't have any existing ring to fit into.
Definition: qgsgeometry.h:152
@ AddRingNotClosed
The input ring is not closed.
Definition: qgsgeometry.h:149
@ AddPartSelectedGeometryNotFound
The selected geometry cannot be found.
Definition: qgsgeometry.h:146
@ GeometryEngineError
Geometry engine misses a method implemented or an error occurred in the geometry engine.
Definition: qgsgeometry.h:143
@ AddPartNotMultiGeometry
The source geometry is not multi.
Definition: qgsgeometry.h:147
@ InvalidInputGeometryType
The input geometry (ring, part, split line, etc.) has not the correct geometry type.
Definition: qgsgeometry.h:140
@ SelectionIsEmpty
No features were selected.
Definition: qgsgeometry.h:141
@ AddRingCrossesExistingRings
The input ring crosses existing rings (it is not disjoint)
Definition: qgsgeometry.h:151
@ SelectionIsGreaterThanOne
More than one features were selected.
Definition: qgsgeometry.h:142
@ LayerNotEditable
Cannot edit layer.
Definition: qgsgeometry.h:144
@ AddRingNotValid
The input ring is not valid.
Definition: qgsgeometry.h:150
ValidityFlag
Validity check flags.
Definition: qgsgeometry.h:368
ValidationMethod
Available methods for validating geometries.
Definition: qgsgeometry.h:2282
@ ValidatorQgisInternal
Use internal QgsGeometryValidator method.
Definition: qgsgeometry.h:2283
@ ValidatorGeos
Use GEOS validation methods.
Definition: qgsgeometry.h:2284
This class offers geometry processing methods.
Line string geometry type, with support for z-dimension and m-values.
Definition: qgslinestring.h:44
Perform transforms between map coordinates and device coordinates.
Definition: qgsmaptopixel.h:39
Custom exception class which is raised when an operation is not supported.
Definition: qgsexception.h:118
A class to represent a 2D point.
Definition: qgspointxy.h:59
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:49
Polygon geometry type.
Definition: qgspolygon.h:34
A rectangle specified with double values.
Definition: qgsrectangle.h:42
Represents a vector layer which manages a vector based data sets.
Java-style iterator for traversal of vertices of a geometry.
Handles storage of information regarding WKB types and their properties.
Definition: qgswkbtypes.h:42
static GeometryType geometryType(Type type) SIP_HOLDGIL
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a Polyg...
Definition: qgswkbtypes.h:938
static bool isMultiType(Type type) SIP_HOLDGIL
Returns true if the WKB type is a multi type.
Definition: qgswkbtypes.h:832
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Definition: qgswkbtypes.h:141
static QString displayString(Type type) SIP_HOLDGIL
Returns a non-translated display string type for a WKB type, e.g., the geometry name used in WKT geom...
static Type flatType(Type type) SIP_HOLDGIL
Returns the flat type for a WKB type.
Definition: qgswkbtypes.h:702
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Definition: MathUtils.cpp:786
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Definition: qgsgeos.h:79
#define str(x)
Definition: qgis.cpp:37
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
Definition: qgis.h:1039
#define SIP_THROW(name)
Definition: qgis_sip.h:189
#define SIP_TYPEHINT(type)
Definition: qgis_sip.h:218
#define SIP_IN
Definition: qgis_sip.h:63
#define SIP_DEPRECATED
Definition: qgis_sip.h:106
#define SIP_SKIP
Definition: qgis_sip.h:126
#define SIP_PYNAME(name)
Definition: qgis_sip.h:81
#define SIP_PYARGREMOVE
Definition: qgis_sip.h:146
#define SIP_TRANSFER
Definition: qgis_sip.h:36
#define SIP_OUT
Definition: qgis_sip.h:58
#define SIP_HOLDGIL
Definition: qgis_sip.h:157
#define SIP_FACTORY
Definition: qgis_sip.h:76
QVector< QgsPoint > QgsPointSequence
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Definition: qgsfeatureid.h:28
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
QVector< QgsPolylineXY > QgsPolygonXY
Polygon: first item of the list is outer ring, inner rings (if any) start from second item.
Definition: qgsgeometry.h:75
QVector< QgsPolylineXY > QgsMultiPolylineXY
A collection of QgsPolylines that share a common collection of attributes.
Definition: qgsgeometry.h:85
CORE_EXPORT QDataStream & operator>>(QDataStream &in, QgsGeometry &geometry)
Reads a geometry from stream in into geometry. QGIS version compatibility is not guaranteed.
QVector< QgsPointXY > QgsMultiPointXY
A collection of QgsPoints that share a common collection of attributes.
Definition: qgsgeometry.h:81
QVector< QgsPointXY > QgsPolylineXY
Polyline as represented as a vector of two-dimensional points.
Definition: qgsgeometry.h:51
CORE_EXPORT QDataStream & operator<<(QDataStream &out, const QgsGeometry &geometry)
Writes the geometry to stream out. QGIS version compatibility is not guaranteed.
QVector< QgsPolygonXY > QgsMultiPolygonXY
A collection of QgsPolygons that share a common collection of attributes.
Definition: qgsgeometry.h:92
QgsPointSequence QgsPolyline
Polyline as represented as a vector of points.
Definition: qgsgeometry.h:71
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
int precision
Utility class for identifying a unique vertex within a geometry.