@@ -26,8 +26,6 @@ class QgsLineString;
26
26
* \class QgsGeometryUtils
27
27
* \brief Contains various geometry utility functions.
28
28
* \note added in QGIS 2.10
29
- * \note this API is not considered stable and may change for 2.12
30
- * \note not available in Python bindings
31
29
*/
32
30
class CORE_EXPORT QgsGeometryUtils
33
31
{
@@ -116,6 +114,7 @@ class CORE_EXPORT QgsGeometryUtils
116
114
return t < 0 . ? s1 : t > 1 . ? s2 : QgsPointV2 ( s1.x () + ( s2.x () - s1.x () ) * t, s1.y () + ( s2.y () - s1.y () ) * t );
117
115
}
118
116
117
+ // ! @note not available in Python bindings
119
118
struct SelfIntersection
120
119
{
121
120
int segment1;
@@ -130,6 +129,7 @@ class CORE_EXPORT QgsGeometryUtils
130
129
* @param ring The ring of the geometry part to check
131
130
* @param tolerance The tolerance to use
132
131
* @return The list of self intersections
132
+ * @note not available in Python bindings
133
133
* @note added in QGIS 2.12
134
134
*/
135
135
static QList<SelfIntersection> getSelfIntersections ( const QgsAbstractGeometry* geom, int part, int ring, double tolerance );
@@ -172,17 +172,38 @@ class CORE_EXPORT QgsGeometryUtils
172
172
static double circleTangentDirection ( const QgsPointV2& tangentPoint, const QgsPointV2& cp1, const QgsPointV2& cp2, const QgsPointV2& cp3 );
173
173
174
174
/* * Returns a list of points contained in a WKT string.
175
+ * @note not available in Python bindings
175
176
*/
176
177
static QgsPointSequence pointsFromWKT ( const QString& wktCoordinateList, bool is3D, bool isMeasure );
177
- // ! Returns a LinearRing { uint32 numPoints; Point points[numPoints]; }
178
+
179
+ /* *
180
+ * Returns a LinearRing { uint32 numPoints; Point points[numPoints]; }
181
+ * @note not available in Python bindings
182
+ */
178
183
static void pointsToWKB ( QgsWkbPtr &wkb, const QgsPointSequence &points, bool is3D, bool isMeasure );
179
- // ! Returns a WKT coordinate list
184
+
185
+ /* *
186
+ * Returns a WKT coordinate list
187
+ * @note not available in Python bindings
188
+ */
180
189
static QString pointsToWKT ( const QgsPointSequence &points, int precision, bool is3D, bool isMeasure );
181
- // ! Returns a gml::coordinates DOM element
190
+
191
+ /* *
192
+ * Returns a gml::coordinates DOM element.
193
+ * @note not available in Python bindings
194
+ */
182
195
static QDomElement pointsToGML2 ( const QgsPointSequence &points, QDomDocument &doc, int precision, const QString& ns );
183
- // ! Returns a gml::posList DOM element
196
+
197
+ /* *
198
+ * Returns a gml::posList DOM element.
199
+ * @note not available in Python bindings
200
+ */
184
201
static QDomElement pointsToGML3 ( const QgsPointSequence &points, QDomDocument &doc, int precision, const QString& ns, bool is3D );
185
- // ! Returns a geoJSON coordinates string
202
+
203
+ /* *
204
+ * Returns a geoJSON coordinates string.
205
+ * @note not available in Python bindings
206
+ */
186
207
static QString pointsToJSON ( const QgsPointSequence &points, int precision );
187
208
188
209
/* * Ensures that an angle is in the range 0 <= angle < 2 pi.
@@ -233,24 +254,30 @@ class CORE_EXPORT QgsGeometryUtils
233
254
*/
234
255
static double averageAngle ( double a1, double a2 );
235
256
236
- /* * Parses a WKT block of the format "TYPE( contents )" and returns a pair of geometry type to contents ("Pair(wkbType, "contents")")
257
+ /* *
258
+ * Parses a WKT block of the format "TYPE( contents )" and returns a pair of geometry type to contents ("Pair(wkbType, "contents")")
259
+ * @note not available in Python bindings
237
260
*/
238
261
static QPair<QgsWkbTypes::Type, QString> wktReadBlock ( const QString& wkt );
239
262
240
- /* * Parses a WKT string and returns of list of blocks contained in the WKT.
263
+ /* *
264
+ * Parses a WKT string and returns of list of blocks contained in the WKT.
241
265
* @param wkt WKT string in the format "TYPE1 (contents1), TYPE2 (TYPE3 (contents3), TYPE4 (contents4))"
242
266
* @param defaultType default geometry type for children
243
267
* @returns list of WKT child block strings, e.g., List("TYPE1 (contents1)", "TYPE2 (TYPE3 (contents3), TYPE4 (contents4))")
268
+ * @note not available in Python bindings
244
269
*/
245
270
static QStringList wktGetChildBlocks ( const QString& wkt , const QString &defaultType = " " );
246
271
272
+ // ! @note not available in Python bindings
247
273
enum ComponentType
248
274
{
249
275
Vertex,
250
276
Ring,
251
277
Part
252
278
};
253
279
280
+ // ! @note not available in Python bindings
254
281
template <class T > static double closestSegmentFromComponents ( T& container, ComponentType ctype, const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool * leftOf, double epsilon )
255
282
{
256
283
double minDist = std::numeric_limits<double >::max ();
0 commit comments