Skip to content

Commit e3787ef

Browse files
committedAug 13, 2017
Doxymentation
1 parent 581b89e commit e3787ef

File tree

2 files changed

+142
-2
lines changed

2 files changed

+142
-2
lines changed
 

‎python/core/geometry/qgsgeometryengine.sip

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,41 @@ class QgsGeometryEngine
2828

2929
virtual QgsAbstractGeometry *intersection( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0 /Factory/;
3030
%Docstring
31+
Calculate the intersection of this and ``geom``.
32+
33+
.. versionadded:: 3.0
3134
:rtype: QgsAbstractGeometry
3235
%End
36+
3337
virtual QgsAbstractGeometry *difference( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0 /Factory/;
3438
%Docstring
39+
Calculate the difference of this and ``geom``.
40+
41+
.. versionadded:: 3.0
3542
:rtype: QgsAbstractGeometry
3643
%End
44+
3745
virtual QgsAbstractGeometry *combine( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0 /Factory/;
3846
%Docstring
47+
Calculate the combination of this and ``geom``.
48+
49+
.. versionadded:: 3.0
3950
:rtype: QgsAbstractGeometry
4051
%End
41-
virtual QgsAbstractGeometry *combine( const QList< QgsAbstractGeometry * > &, QString *errorMsg = 0 ) const = 0 /Factory/;
52+
53+
virtual QgsAbstractGeometry *combine( const QList< QgsAbstractGeometry * > &geometries, QString *errorMsg = 0 ) const = 0 /Factory/;
4254
%Docstring
55+
Calculate the combination of this and ``geometries``.
56+
57+
.. versionadded:: 3.0
4358
:rtype: QgsAbstractGeometry
4459
%End
60+
4561
virtual QgsAbstractGeometry *symDifference( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0 /Factory/;
4662
%Docstring
63+
Calculate the symmetric difference of this and ``geom``.
64+
65+
.. versionadded:: 3.0
4766
:rtype: QgsAbstractGeometry
4867
%End
4968
virtual QgsAbstractGeometry *buffer( double distance, int segments, QString *errorMsg = 0 ) const = 0 /Factory/;
@@ -78,36 +97,68 @@ class QgsGeometryEngine
7897
%Docstring
7998
:rtype: QgsAbstractGeometry
8099
%End
100+
81101
virtual double distance( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
82102
%Docstring
103+
Calculates the distance between this and ``geom``.
104+
105+
.. versionadded:: 3.0
83106
:rtype: float
84107
%End
108+
85109
virtual bool intersects( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
86110
%Docstring
111+
Checks if ``geom`` intersects this.
112+
113+
.. versionadded:: 3.0
87114
:rtype: bool
88115
%End
116+
89117
virtual bool touches( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
90118
%Docstring
119+
Checks if ``geom`` touches this.
120+
121+
.. versionadded:: 3.0
91122
:rtype: bool
92123
%End
124+
93125
virtual bool crosses( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
94126
%Docstring
127+
Checks if ``geom`` crosses this.
128+
129+
.. versionadded:: 3.0
95130
:rtype: bool
96131
%End
132+
97133
virtual bool within( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
98134
%Docstring
135+
Checks if ``geom`` is within this.
136+
137+
.. versionadded:: 3.0
99138
:rtype: bool
100139
%End
140+
101141
virtual bool overlaps( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
102142
%Docstring
143+
Checks if ``geom`` overlaps this.
144+
145+
.. versionadded:: 3.0
103146
:rtype: bool
104147
%End
148+
105149
virtual bool contains( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
106150
%Docstring
151+
Checks if ``geom`` contains this.
152+
153+
.. versionadded:: 3.0
107154
:rtype: bool
108155
%End
156+
109157
virtual bool disjoint( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
110158
%Docstring
159+
Checks if ``geom`` is disjoint from this.
160+
161+
.. versionadded:: 3.0
111162
:rtype: bool
112163
%End
113164

@@ -146,8 +197,13 @@ class QgsGeometryEngine
146197
%Docstring
147198
:rtype: bool
148199
%End
200+
149201
virtual bool isEqual( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
150202
%Docstring
203+
Checks if this is equal to ``geom``.
204+
If both are Null geometries, `false` is returned.
205+
206+
.. versionadded:: 3.0
151207
:rtype: bool
152208
%End
153209
virtual bool isEmpty( QString *errorMsg ) const = 0;

‎src/core/geometry/qgsgeometryengine.h

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,39 @@ class CORE_EXPORT QgsGeometryEngine
3636
virtual void geometryChanged() = 0;
3737
virtual void prepareGeometry() = 0;
3838

39+
/**
40+
* Calculate the intersection of this and \a geom.
41+
*
42+
* \since QGIS 3.0 \a geom is a pointer
43+
*/
3944
virtual QgsAbstractGeometry *intersection( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
45+
46+
/**
47+
* Calculate the difference of this and \a geom.
48+
*
49+
* \since QGIS 3.0 \a geom is a pointer
50+
*/
4051
virtual QgsAbstractGeometry *difference( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
52+
53+
/**
54+
* Calculate the combination of this and \a geom.
55+
*
56+
* \since QGIS 3.0 \a geom is a pointer
57+
*/
4158
virtual QgsAbstractGeometry *combine( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
42-
virtual QgsAbstractGeometry *combine( const QList< QgsAbstractGeometry * > &, QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
59+
60+
/**
61+
* Calculate the combination of this and \a geometries.
62+
*
63+
* \since QGIS 3.0 \a geom is a pointer
64+
*/
65+
virtual QgsAbstractGeometry *combine( const QList< QgsAbstractGeometry * > &geometries, QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
66+
67+
/**
68+
* Calculate the symmetric difference of this and \a geom.
69+
*
70+
* \since QGIS 3.0 \a geom is a pointer
71+
*/
4372
virtual QgsAbstractGeometry *symDifference( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
4473
virtual QgsAbstractGeometry *buffer( double distance, int segments, QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
4574
virtual QgsAbstractGeometry *buffer( double distance, int segments, int endCapStyle, int joinStyle, double miterLimit, QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
@@ -49,13 +78,61 @@ class CORE_EXPORT QgsGeometryEngine
4978
virtual bool centroid( QgsPoint &pt, QString *errorMsg = nullptr ) const = 0;
5079
virtual bool pointOnSurface( QgsPoint &pt, QString *errorMsg = nullptr ) const = 0;
5180
virtual QgsAbstractGeometry *convexHull( QString *errorMsg = nullptr ) const = 0 SIP_FACTORY;
81+
82+
/**
83+
* Calculates the distance between this and \a geom.
84+
*
85+
* \since QGIS 3.0 \a geom is a pointer
86+
*/
5287
virtual double distance( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
88+
89+
/**
90+
* Checks if \a geom intersects this.
91+
*
92+
* \since QGIS 3.0 \a geom is a pointer
93+
*/
5394
virtual bool intersects( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
95+
96+
/**
97+
* Checks if \a geom touches this.
98+
*
99+
* \since QGIS 3.0 \a geom is a pointer
100+
*/
54101
virtual bool touches( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
102+
103+
/**
104+
* Checks if \a geom crosses this.
105+
*
106+
* \since QGIS 3.0 \a geom is a pointer
107+
*/
55108
virtual bool crosses( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
109+
110+
/**
111+
* Checks if \a geom is within this.
112+
*
113+
* \since QGIS 3.0 \a geom is a pointer
114+
*/
56115
virtual bool within( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
116+
117+
/**
118+
* Checks if \a geom overlaps this.
119+
*
120+
* \since QGIS 3.0 \a geom is a pointer
121+
*/
57122
virtual bool overlaps( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
123+
124+
/**
125+
* Checks if \a geom contains this.
126+
*
127+
* \since QGIS 3.0 \a geom is a pointer
128+
*/
58129
virtual bool contains( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
130+
131+
/**
132+
* Checks if \a geom is disjoint from this.
133+
*
134+
* \since QGIS 3.0 \a geom is a pointer
135+
*/
59136
virtual bool disjoint( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
60137

61138
/** Returns the Dimensional Extended 9 Intersection Model (DE-9IM) representation of the
@@ -80,6 +157,13 @@ class CORE_EXPORT QgsGeometryEngine
80157
virtual double area( QString *errorMsg = nullptr ) const = 0;
81158
virtual double length( QString *errorMsg = nullptr ) const = 0;
82159
virtual bool isValid( QString *errorMsg = nullptr ) const = 0;
160+
161+
/**
162+
* Checks if this is equal to \a geom.
163+
* If both are Null geometries, `false` is returned.
164+
*
165+
* \since QGIS 3.0 \a geom is a pointer
166+
*/
83167
virtual bool isEqual( const QgsAbstractGeometry *geom, QString *errorMsg = nullptr ) const = 0;
84168
virtual bool isEmpty( QString *errorMsg ) const = 0;
85169

0 commit comments

Comments
 (0)