@@ -521,6 +521,26 @@ class CORE_EXPORT QgsGeometry
521
521
*/
522
522
static QgsGeometry *unaryUnion ( const QList<QgsGeometry*>& geometryList );
523
523
524
+ /* * Compares two polylines for equality within a specified tolerance.
525
+ * @param p1 first polyline
526
+ * @param p2 second polyline
527
+ * @param epsilon maximum difference for coordinates between the polylines
528
+ * @returns true if polylines have the same number of points and all
529
+ * points are equal within the specified tolerance
530
+ * @note added in QGIS 2.9
531
+ */
532
+ static bool compare ( const QgsPolyline& p1, const QgsPolyline& p2, double epsilon = 4 * DBL_EPSILON );
533
+
534
+ /* * Compares two polygons for equality within a specified tolerance.
535
+ * @param p1 first polygon
536
+ * @param p2 second polygon
537
+ * @param epsilon maximum difference for coordinates between the polygons
538
+ * @returns true if polygons have the same number of rings, and each ring has the same
539
+ * number of points and all points are equal within the specified tolerance
540
+ * @note added in QGIS 2.9
541
+ */
542
+ static bool compare ( const QgsPolygon& p1, const QgsPolygon& p2, double epsilon = 4 * DBL_EPSILON );
543
+
524
544
private:
525
545
// Private variables
526
546
@@ -687,7 +707,7 @@ class CORE_EXPORT QgsWkbPtr
687
707
inline const QgsWkbPtr &operator >>( char &v ) const { memcpy ( &v, mP , sizeof ( v ) ); mP += sizeof ( v ); return *this ; }
688
708
inline const QgsWkbPtr &operator >>( QGis::WkbType &v ) const { memcpy ( &v, mP , sizeof ( v ) ); mP += sizeof ( v ); return *this ; }
689
709
#ifdef QT_ARCH_ARM
690
- inline const QgsWkbPtr &operator >>( qreal &v ) const { double d; memcpy ( &d, mP , sizeof ( d ) ); mP += sizeof ( d ); v= d; return *this ; }
710
+ inline const QgsWkbPtr &operator >>( qreal &v ) const { double d; memcpy ( &d, mP , sizeof ( d ) ); mP += sizeof ( d ); v = d; return *this ; }
691
711
#endif
692
712
693
713
inline QgsWkbPtr &operator <<( const double &v ) { memcpy ( mP , &v, sizeof ( v ) ); mP += sizeof ( v ); return *this ; }
@@ -717,7 +737,7 @@ class CORE_EXPORT QgsConstWkbPtr
717
737
inline const QgsConstWkbPtr &operator >>( char &v ) const { memcpy ( &v, mP , sizeof ( v ) ); mP += sizeof ( v ); return *this ; }
718
738
inline const QgsConstWkbPtr &operator >>( QGis::WkbType &v ) const { memcpy ( &v, mP , sizeof ( v ) ); mP += sizeof ( v ); return *this ; }
719
739
#ifdef QT_ARCH_ARM
720
- inline const QgsConstWkbPtr &operator >>( qreal &v ) const { double d; memcpy ( &d, mP , sizeof ( d ) ); mP += sizeof ( d ); v= d; return *this ; }
740
+ inline const QgsConstWkbPtr &operator >>( qreal &v ) const { double d; memcpy ( &d, mP , sizeof ( d ) ); mP += sizeof ( d ); v = d; return *this ; }
721
741
#endif
722
742
723
743
inline void operator +=( int n ) { mP += n; }
0 commit comments