Skip to content

Commit 6122f04

Browse files
committed
Remove unimplemented QgsSurfaceV2::pointOnSurface method
Was always returning a point not on the surface! (0,0). Use the GEOS method instead.
1 parent 2963408 commit 6122f04

File tree

5 files changed

+1
-9
lines changed

5 files changed

+1
-9
lines changed

python/core/geometry/qgscurvepolygonv2.sip

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class QgsCurvePolygonV2: public QgsSurfaceV2
3030
//surface interface
3131
virtual double area() const;
3232
virtual double perimeter() const;
33-
QgsPointV2 pointOnSurface() const;
3433
QgsPolygonV2* surfaceToPolygon() const;
3534

3635
//curve polygon interface

python/core/geometry/qgssurfacev2.sip

-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ class QgsSurfaceV2: public QgsAbstractGeometryV2
55
%End
66

77
public:
8-
virtual QgsPointV2 pointOnSurface() const = 0;
98
virtual QgsPolygonV2* surfaceToPolygon() const = 0;
109
};

src/core/geometry/qgscurvepolygonv2.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,6 @@ double QgsCurvePolygonV2::perimeter() const
399399
return perimeter;
400400
}
401401

402-
QgsPointV2 QgsCurvePolygonV2::pointOnSurface() const
403-
{
404-
return QgsPointV2( 0, 0 );
405-
}
406-
407402
QgsPolygonV2* QgsCurvePolygonV2::surfaceToPolygon() const
408403
{
409404
QgsPolygonV2* polygon = new QgsPolygonV2();

src/core/geometry/qgscurvepolygonv2.h

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class CORE_EXPORT QgsCurvePolygonV2: public QgsSurfaceV2
5656
//surface interface
5757
virtual double area() const override;
5858
virtual double perimeter() const override;
59-
QgsPointV2 pointOnSurface() const override;
6059
QgsPolygonV2* surfaceToPolygon() const override;
6160

6261
//curve polygon interface

src/core/geometry/qgssurfacev2.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class QgsPolygonV2;
2626
class CORE_EXPORT QgsSurfaceV2: public QgsAbstractGeometryV2
2727
{
2828
public:
29-
virtual QgsPointV2 pointOnSurface() const = 0;
29+
3030
virtual QgsPolygonV2* surfaceToPolygon() const = 0;
3131
};
3232

0 commit comments

Comments
 (0)