21 #include <QDomDocument> 22 #include <QJsonObject> 31 #include "qgis_core.h" 40 #include "json_fwd.hpp" 126 Q_PROPERTY(
bool isNull READ isNull )
138 NothingHappened = 1000,
168 QgsGeometry &operator=( QgsGeometry const &rhs )
SIP_SKIP;
184 virtual ~QgsGeometry();
234 bool isNull() const SIP_HOLDGIL;
237 static QgsGeometry fromWkt( const QString &wkt );
239 static QgsGeometry fromPointXY( const
QgsPointXY &point ) SIP_HOLDGIL;
241 static QgsGeometry fromMultiPointXY( const
QgsMultiPointXY &multipoint );
254 static QgsGeometry fromPolylineXY( const
QgsPolylineXY &polyline );
265 static QgsGeometry fromPolyline( const
QgsPolyline &polyline );
270 static QgsGeometry fromPolygonXY( const
QgsPolygonXY &polygon );
274 static QgsGeometry fromRect( const
QgsRectangle &rect ) SIP_HOLDGIL;
276 static QgsGeometry collectGeometry( const QVector<QgsGeometry> &geometries );
293 static QgsGeometry createWedgeBuffer( const
QgsPoint ¢er,
double azimuth,
double angularWidth,
294 double outerRadius,
double innerRadius = 0 );
301 void fromWkb(
unsigned char *wkb,
int length ) SIP_SKIP;
307 void fromWkb( const QByteArray &wkb );
319 QgsWkbTypes::GeometryType type() const SIP_HOLDGIL;
327 bool isEmpty() const;
330 bool isMultipart() const SIP_HOLDGIL;
346 bool equals( const QgsGeometry &geometry ) const;
364 bool isGeosEqual( const QgsGeometry & ) const;
369 FlagAllowSelfTouchingHoles = 1 << 0,
380 bool isGeosValid( QgsGeometry::ValidityFlags flags = QgsGeometry::ValidityFlags() )
const;
390 bool isSimple()
const;
418 double length()
const;
605 double hausdorffDistance(
const QgsGeometry &geom )
const;
625 double hausdorffDistanceDensify(
const QgsGeometry &geom,
double densifyFraction )
const;
639 QgsPointXY closestVertex(
const QgsPointXY &point,
int &closestVertexIndex
SIP_OUT,
int &previousVertexIndex SIP_OUT,
int &nextVertexIndex SIP_OUT,
double &sqrDist SIP_OUT )
const;
649 double distanceToVertex(
int vertex )
const;
658 double angleAtVertex(
int vertex )
const;
672 void adjacentVertices(
int atVertex,
int &beforeVertex
SIP_OUT,
int &afterVertex SIP_OUT )
const;
686 bool insertVertex(
double x,
double y,
int beforeVertex );
700 bool insertVertex(
const QgsPoint &point,
int beforeVertex );
709 bool moveVertex(
double x,
double y,
int atVertex );
718 bool moveVertex(
const QgsPoint &p,
int atVertex );
731 bool deleteVertex(
int atVertex );
738 QgsPoint vertexAt(
int atVertex )
const;
772 double closestVertexWithContext(
const QgsPointXY &point,
int &atVertex
SIP_OUT )
const;
838 QgsGeometry removeInteriorRings(
double minimumAllowedArea = -1 )
const;
844 OperationResult translate(
double dx,
double dy,
double dz = 0.0,
double dm = 0.0 );
870 OperationResult transform( const QTransform &t,
double zTranslate = 0.0,
double zScale = 1.0,
double mTranslate = 0.0,
double mScale = 1.0 );
967 QgsGeometry orientedMinimumBoundingBox(
double &area SIP_OUT,
double &
angle SIP_OUT,
double &width SIP_OUT,
double &height SIP_OUT ) const;
978 QgsGeometry orientedMinimumBoundingBox() const SIP_SKIP;
988 QgsGeometry minimalEnclosingCircle(
QgsPointXY ¢er SIP_OUT,
double &radius SIP_OUT,
unsigned int segments = 36 ) const;
995 QgsGeometry minimalEnclosingCircle(
unsigned int segments = 36 ) const SIP_SKIP;
1005 QgsGeometry orthogonalize(
double tolerance = 1.0E-8,
int maxIterations = 1000,
double angleThreshold = 15.0 ) const;
1019 QgsGeometry snappedToGrid(
double hSpacing,
double vSpacing,
double dSpacing = 0,
double mSpacing = 0 ) const;
1041 bool removeDuplicateNodes(
double epsilon = 4 * std::numeric_limits<
double>::epsilon(),
bool useZValues = false );
1052 bool intersects( const
QgsRectangle &rectangle ) const;
1063 bool intersects( const
QgsGeometry &geometry ) const;
1074 bool boundingBoxIntersects( const
QgsRectangle &rectangle ) const;
1085 bool boundingBoxIntersects( const
QgsGeometry &geometry ) const;
1096 bool contains( const
QgsGeometry &geometry ) const;
1102 bool disjoint( const
QgsGeometry &geometry ) const;
1108 bool touches( const
QgsGeometry &geometry ) const;
1114 bool overlaps( const
QgsGeometry &geometry ) const;
1127 bool crosses( const
QgsGeometry &geometry ) const;
1162 QgsGeometry buffer(
double distance,
int segments )
const;
1186 QgsGeometry offsetCurve(
double distance,
int segments,
JoinStyle joinStyle,
double miterLimit )
const;
1205 double miterLimit = 2.0 )
const;
1224 QgsGeometry taperedBuffer(
double startWidth,
double endWidth,
int segments )
const;
1240 QgsGeometry variableWidthBufferByM(
int segments )
const;
1248 QgsGeometry extendLine(
double startDistance,
double endDistance )
const;
1262 QgsGeometry densifyByCount(
int extraNodesPerSegment )
const;
1278 QgsGeometry densifyByDistance(
double distance )
const;
1295 QgsGeometry convertToCurves(
double distanceTolerance = 1e-8,
double angleTolerance = 1e-8 )
const;
1377 QgsGeometry delaunayTriangulation(
double tolerance = 0.0,
bool edgesOnly =
false )
const;
1398 QgsGeometry subdivide(
int maxNodes = 256 )
const;
1428 double lineLocatePoint(
const QgsGeometry &point )
const;
1439 double interpolateAngle(
double distance )
const;
1529 QVector< QgsPointXY > randomPointsInPolygon(
int count,
const std::function<
bool(
const QgsPointXY & ) > &acceptPoint,
unsigned long seed = 0,
QgsFeedback *feedback =
nullptr,
int maxTriesPerPoint = 0 )
const;
1544 QVector< QgsPointXY > randomPointsInPolygon(
int count,
unsigned long seed = 0,
QgsFeedback *feedback =
nullptr )
const;
1562 const
QgsWkbTypes::GeometryType type = sipCpp->type();
1563 if ( sipCpp->isNull() )
1565 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Cannot generate points inside a null geometry." ).toUtf8().constData() );
1570 PyErr_SetString( PyExc_TypeError, QStringLiteral(
"Cannot generate points inside a %1 geometry. Only Polygon types are permitted." ).arg(
QgsWkbTypes::displayString( sipCpp->wkbType() ) ).toUtf8().constData() );
1575 const sipTypeDef *qvector_type = sipFindType(
"QVector<QgsPointXY>" );
1576 sipRes = sipConvertFromNewType(
new QVector< QgsPointXY >( sipCpp->randomPointsInPolygon( a0, a1 ) ), qvector_type, Py_None );
1591 int wkbSize( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() )
const;
1600 QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() )
const;
1607 QString asWkt(
int precision = 17 )
const;
1610 SIP_PYOBJECT __repr__();
1613 if ( sipCpp->isNull() )
1614 str = QStringLiteral(
"<QgsGeometry: null>" );
1617 QString wkt = sipCpp->asWkt();
1618 if ( wkt.length() > 1000 )
1619 wkt = wkt.left( 1000 ) + QStringLiteral(
"..." );
1620 str = QStringLiteral(
"<QgsGeometry: %1>" ).arg( wkt );
1622 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
1629 QString asJson(
int precision = 17 )
const;
1702 if ( sipCpp->isNull() )
1704 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Null geometry cannot be converted to a point." ).toUtf8().constData() );
1709 PyErr_SetString( PyExc_TypeError, QStringLiteral(
"%1 geometry cannot be converted to a point. Only Point types are permitted." ).arg(
QgsWkbTypes::displayString( type ) ).toUtf8().constData() );
1714 sipRes = sipConvertFromNewType(
new QgsPointXY( sipCpp->asPoint() ), sipType_QgsPointXY, Py_None );
1729 QgsPolylineXY asPolyline()
const;
1742 SIP_PYOBJECT asPolyline() const
SIP_TYPEHINT( QgsPolylineXY );
1745 if ( sipCpp->isNull() )
1747 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Null geometry cannot be converted to a polyline." ).toUtf8().constData() );
1752 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() );
1757 const sipTypeDef *qvector_type = sipFindType(
"QVector< QgsPointXY >" );
1758 sipRes = sipConvertFromNewType(
new QgsPolylineXY( sipCpp->asPolyline() ), qvector_type, Py_None );
1789 if ( sipCpp->isNull() )
1791 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Null geometry cannot be converted to a polygon." ).toUtf8().constData() );
1796 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() );
1801 const sipTypeDef *qvector_type = sipFindType(
"QVector<QVector<QgsPointXY>>" );
1802 sipRes = sipConvertFromNewType(
new QgsPolygonXY( sipCpp->asPolygon() ), qvector_type, Py_None );
1831 if ( sipCpp->isNull() )
1833 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Null geometry cannot be converted to a multipoint." ).toUtf8().constData() );
1838 PyErr_SetString( PyExc_TypeError, QStringLiteral(
"%1 geometry cannot be converted to a multipoint. Only multipoint types are permitted." ).arg(
QgsWkbTypes::displayString( type ) ).toUtf8().constData() );
1843 const sipTypeDef *qvector_type = sipFindType(
"QVector< QgsPointXY >" );
1844 sipRes = sipConvertFromNewType(
new QgsPolylineXY( sipCpp->asMultiPoint() ), qvector_type, Py_None );
1875 if ( sipCpp->isNull() )
1877 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Null geometry cannot be converted to a multilinestring." ).toUtf8().constData() );
1882 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() );
1887 const sipTypeDef *qvector_type = sipFindType(
"QVector<QVector<QgsPointXY>>" );
1888 sipRes = sipConvertFromNewType(
new QgsMultiPolylineXY( sipCpp->asMultiPolyline() ), qvector_type, Py_None );
1919 if ( sipCpp->isNull() )
1921 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Null geometry cannot be converted to a multipolygon." ).toUtf8().constData() );
1926 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() );
1931 const sipTypeDef *qvector_type = sipFindType(
"QVector<QVector<QVector<QgsPointXY>>>" );
1932 sipRes = sipConvertFromNewType(
new QgsMultiPolygonXY( sipCpp->asMultiPolygon() ), qvector_type, Py_None );
1941 QVector<QgsGeometry> asGeometryCollection()
const;
1970 bool deleteRing(
int ringNum,
int partNum = 0 );
1977 bool deletePart(
int partNum );
1987 bool convertToMultiType();
1998 bool convertToSingleType();
2009 bool convertGeometryCollectionToSubclass(
QgsWkbTypes::GeometryType geomType );
2021 int avoidIntersections( const QList<
QgsVectorLayer *> &avoidIntersectionsLayers,
2060 : mMessage( QStringLiteral(
"none" ) )
2067 Error(
const QString &m,
const QgsPointXY &p )
2070 , mHasLocation( true ) {}
2075 QString what()
const;
2080 QgsPointXY where()
const;
2085 bool hasWhere()
const;
2088 SIP_PYOBJECT __repr__();
2090 QString str = QStringLiteral(
"<QgsGeometry.Error: %1>" ).arg( sipCpp->what() );
2091 sipRes = PyUnicode_FromString( str.toUtf8().data() );
2097 return other.mMessage == mMessage && other.mHasLocation == mHasLocation && other.mLocation == mLocation;
2102 QgsPointXY mLocation;
2103 bool mHasLocation =
false;
2124 void validateGeometry( QVector<QgsGeometry::Error> &errors
SIP_OUT,
ValidationMethod method = ValidatorQgisInternal, QgsGeometry::ValidityFlags flags = QgsGeometry::ValidityFlags() )
const;
2131 static QgsGeometry unaryUnion(
const QVector<QgsGeometry> &geometries );
2141 static QgsGeometry polygonize(
const QVector<QgsGeometry> &geometries );
2158 bool requiresConversionToStraightSegments()
const;
2172 void draw( QPainter &p )
const;
2184 bool vertexIdFromVertexNr(
int number,
QgsVertexId &
id SIP_OUT )
const;
2217 void filterVertices( const std::function<
bool( const
QgsPoint & ) > &filter )
SIP_SKIP;
2233 void transformVertices( const std::function<
QgsPoint( const
QgsPoint & ) > &transform ) SIP_SKIP;
2249 static
QgsGeometry fromQPolygonF( const QPolygonF &polygon );
2258 Q_DECL_DEPRECATED static QgsPolylineXY createPolylineFromQPolygonF( const QPolygonF &polygon )
SIP_DEPRECATED;
2267 Q_DECL_DEPRECATED static QgsPolygonXY createPolygonFromQPolygonF( const QPolygonF &polygon ) SIP_DEPRECATED;
2280 static bool compare(
const QgsPolylineXY &p1,
const QgsPolylineXY &p2,
2281 double epsilon = 4 * std::numeric_limits<double>::epsilon() );
2292 static bool compare(
const QgsPolygonXY &p1,
const QgsPolygonXY &p2,
2293 double epsilon = 4 * std::numeric_limits<double>::epsilon() );
2305 static bool compare(
const QgsMultiPolygonXY &p1,
const QgsMultiPolygonXY &p2,
2306 double epsilon = 4 * std::numeric_limits<double>::epsilon() );
2328 static bool compare( PyObject *obj1, PyObject *obj2,
double epsilon = 4 * std::numeric_limits<double>::epsilon() );
2336 if ( PyList_Check( a0 ) && PyList_Check( a1 ) &&
2337 PyList_GET_SIZE( a0 ) && PyList_GET_SIZE( a1 ) )
2339 PyObject *o0 = PyList_GetItem( a0, 0 );
2340 PyObject *o1 = PyList_GetItem( a1, 0 );
2344 if ( sipCanConvertToType( o0, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2345 sipCanConvertToType( o1, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2346 sipCanConvertToType( a0, sipType_QVector_0100QgsPointXY, SIP_NOT_NONE ) &&
2347 sipCanConvertToType( a1, sipType_QVector_0100QgsPointXY, SIP_NOT_NONE ) )
2351 p0 =
reinterpret_cast<QgsPolylineXY *
>( sipConvertToType( a0, sipType_QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
2352 p1 =
reinterpret_cast<QgsPolylineXY *
>( sipConvertToType( a1, sipType_QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
2355 sipReleaseType( p0, sipType_QVector_0100QgsPointXY, state0 );
2356 sipReleaseType( p1, sipType_QVector_0100QgsPointXY, state1 );
2363 else if ( PyList_Check( o0 ) && PyList_Check( o1 ) &&
2364 PyList_GET_SIZE( o0 ) && PyList_GET_SIZE( o1 ) )
2366 PyObject *oo0 = PyList_GetItem( o0, 0 );
2367 PyObject *oo1 = PyList_GetItem( o1, 0 );
2371 if ( sipCanConvertToType( oo0, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2372 sipCanConvertToType( oo1, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2373 sipCanConvertToType( a0, sipType_QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) &&
2374 sipCanConvertToType( a1, sipType_QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) )
2378 p0 =
reinterpret_cast<QgsPolygonXY *
>( sipConvertToType( a0, sipType_QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
2379 p1 =
reinterpret_cast<QgsPolygonXY *
>( sipConvertToType( a1, sipType_QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
2382 sipReleaseType( p0, sipType_QVector_0600QVector_0100QgsPointXY, state0 );
2383 sipReleaseType( p1, sipType_QVector_0600QVector_0100QgsPointXY, state1 );
2390 else if ( PyList_Check( oo0 ) && PyList_Check( oo1 ) &&
2391 PyList_GET_SIZE( oo0 ) && PyList_GET_SIZE( oo1 ) )
2393 PyObject *ooo0 = PyList_GetItem( oo0, 0 );
2394 PyObject *ooo1 = PyList_GetItem( oo1, 0 );
2398 if ( sipCanConvertToType( ooo0, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2399 sipCanConvertToType( ooo1, sipType_QgsPointXY, SIP_NOT_NONE ) &&
2400 sipCanConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) &&
2401 sipCanConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) )
2403 QgsMultiPolygonXY *p0;
2404 QgsMultiPolygonXY *p1;
2405 p0 =
reinterpret_cast<QgsMultiPolygonXY *
>( sipConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
2406 p1 =
reinterpret_cast<QgsMultiPolygonXY *
>( sipConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
2409 sipReleaseType( p0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, state0 );
2410 sipReleaseType( p1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, state1 );
2443 QgsGeometry smooth(
unsigned int iterations = 1,
double offset = 0.25,
2444 double minimumDistance = -1.0,
double maxAngle = 180.0 )
const;
2456 static void convertPointList(
const QVector<QgsPointXY> &input,
QgsPointSequence &output );
2463 static void convertPointList(
const QgsPointSequence &input, QVector<QgsPointXY> &output );
2466 operator QVariant()
const 2468 return QVariant::fromValue( *
this );
2476 mutable QString mLastError;
2488 void reset( std::unique_ptr< QgsAbstractGeometry > newGeometry );
2490 static void convertToPolyline(
const QgsPointSequence &input, QgsPolylineXY &output );
2491 static void convertPolygon(
const QgsPolygon &input, QgsPolygonXY &output );
2494 QgsGeometry convertToPoint(
bool destMultipart )
const;
2496 QgsGeometry convertToLine(
bool destMultipart )
const;
2498 QgsGeometry convertToPolygon(
bool destMultipart )
const;
2511 std::unique_ptr< QgsLineString > smoothLine(
const QgsLineString &line,
unsigned int iterations = 1,
double offset = 0.25,
2512 double minimumDistance = -1,
double maxAngle = 180.0 )
const;
2525 std::unique_ptr< QgsPolygon > smoothPolygon(
const QgsPolygon &polygon,
unsigned int iterations = 1,
double offset = 0.25,
2526 double minimumDistance = -1,
double maxAngle = 180.0 )
const;
Geometry engine misses a method implemented or an error occurred in the geometry engine.
QgsPointSequence QgsPolyline
Polyline as represented as a vector of points.
A rectangle specified with double values.
Java-style iterator for traversal of parts of a geometry.
The input ring doesn't have any existing ring to fit into.
Java-style iterator for traversal of vertices of a geometry.
The source geometry is not multi.
Maximum angle between generating radii (lines from arc center to output vertices) ...
Use GEOS validation methods.
bool operator==(const QgsGeometry::Error &other) const
Java-style iterator for const traversal of parts of a geometry.
Handles storage of information regarding WKB types and their properties.
A class to represent a 2D point.
QVector< QgsPolylineXY > QgsPolygonXY
Polygon: first item of the list is outer ring, inner rings (if any) start from second item...
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features ...
static Type flatType(Type type) SIP_HOLDGIL
Returns the flat type for a WKB type.
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.
A geometry is the spatial representation of a feature.
QVector< QgsPointXY > QgsMultiPointXY
A collection of QgsPoints that share a common collection of attributes.
The part_iterator class provides STL-style iterator for const references to geometry parts...
SegmentationToleranceType
Segmentation tolerance as maximum angle or maximum difference between approximation and circle...
EndCapStyle
End cap styles for buffers.
#define SIP_TYPEHINT(type)
OperationResult
Success or failure of a geometry operation.
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)
QVector< QgsPolygonXY > QgsMultiPolygonXY
A collection of QgsPolygons that share a common collection of attributes.
Error(const QString &m, const QgsPointXY &p)
QVector< QgsPolylineXY > QgsMultiPolylineXY
A collection of QgsPolylines that share a common collection of attributes.
Base class for feedback objects to be used for cancellation of something running in a worker thread...
CORE_EXPORT QDataStream & operator<<(QDataStream &out, const QgsGeometry &geometry)
Writes the geometry to stream out. QGIS version compatibility is not guaranteed.
Perform transforms between map coordinates and device coordinates.
The selected geometry cannot be found.
No features were selected.
More than one features were selected.
Utility class for identifying a unique vertex within a geometry.
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
The input ring crosses existing rings (it is not disjoint)
The part_iterator class provides STL-style iterator for geometry parts.
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Use internal QgsGeometryValidator method.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
The input ring is not closed.
Square cap (extends past start/end of line by buffer distance)
Abstract base class for curved geometry type.
Abstract base class for all geometries.
The vertex_iterator class provides STL-style iterator for vertices.
Point geometry type, with support for z-dimension and m-values.
This class offers geometry processing methods.
CORE_EXPORT QDataStream & operator>>(QDataStream &in, QgsGeometry &geometry)
Reads a geometry from stream in into geometry. QGIS version compatibility is not guaranteed.
BufferSide
Side of line to buffer.
QVector< QgsPoint > QgsPointSequence
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
QVector< QgsPointXY > QgsPolylineXY
Polyline as represented as a vector of two-dimensional points.
The base geometry on which the operation is done is invalid or empty.
The input geometry (ring, part, split line, etc.) has not the correct geometry type.
Line string geometry type, with support for z-dimension and m-values.
ValidationMethod
Available methods for validating geometries.
ValidityFlag
Validity check flags.
The input ring is not valid.
Contains geometry relation and modification algorithms.
static bool isMultiType(Type type) SIP_HOLDGIL
Returns true if the WKB type is a multi type.
Custom exception class for Coordinate Reference System related exceptions.
JoinStyle
Join styles for buffers.
Flat cap (in line with start/end of line)
Represents a vector layer which manages a vector based data sets.
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 GeometryType geometryType(Type type) SIP_HOLDGIL
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a Polyg...
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.