Skip to content
Permalink
Browse files

Remove unimplemented QgsSurfaceV2::pointOnSurface method

Was always returning a point not on the surface! (0,0). Use the
GEOS method instead.
  • Loading branch information
nyalldawson committed Dec 22, 2015
1 parent 2963408 commit 6122f0462db1b3f12acd4c96cb9fdc4cb42e571b
@@ -30,7 +30,6 @@ class QgsCurvePolygonV2: public QgsSurfaceV2
//surface interface
virtual double area() const;
virtual double perimeter() const;
QgsPointV2 pointOnSurface() const;
QgsPolygonV2* surfaceToPolygon() const;

//curve polygon interface
@@ -5,6 +5,5 @@ class QgsSurfaceV2: public QgsAbstractGeometryV2
%End

public:
virtual QgsPointV2 pointOnSurface() const = 0;
virtual QgsPolygonV2* surfaceToPolygon() const = 0;
};
@@ -399,11 +399,6 @@ double QgsCurvePolygonV2::perimeter() const
return perimeter;
}

QgsPointV2 QgsCurvePolygonV2::pointOnSurface() const
{
return QgsPointV2( 0, 0 );
}

QgsPolygonV2* QgsCurvePolygonV2::surfaceToPolygon() const
{
QgsPolygonV2* polygon = new QgsPolygonV2();
@@ -56,7 +56,6 @@ class CORE_EXPORT QgsCurvePolygonV2: public QgsSurfaceV2
//surface interface
virtual double area() const override;
virtual double perimeter() const override;
QgsPointV2 pointOnSurface() const override;
QgsPolygonV2* surfaceToPolygon() const override;

//curve polygon interface
@@ -26,7 +26,7 @@ class QgsPolygonV2;
class CORE_EXPORT QgsSurfaceV2: public QgsAbstractGeometryV2
{
public:
virtual QgsPointV2 pointOnSurface() const = 0;

virtual QgsPolygonV2* surfaceToPolygon() const = 0;
};

0 comments on commit 6122f04

Please sign in to comment.
You can’t perform that action at this time.