Skip to content

Commit

Permalink
Remove unimplemented QgsSurfaceV2::pointOnSurface method
Browse files Browse the repository at this point in the history
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 6122f04
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion python/core/geometry/qgscurvepolygonv2.sip
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion python/core/geometry/qgssurfacev2.sip
Expand Up @@ -5,6 +5,5 @@ class QgsSurfaceV2: public QgsAbstractGeometryV2
%End

public:
virtual QgsPointV2 pointOnSurface() const = 0;
virtual QgsPolygonV2* surfaceToPolygon() const = 0;
};
5 changes: 0 additions & 5 deletions src/core/geometry/qgscurvepolygonv2.cpp
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion src/core/geometry/qgscurvepolygonv2.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgssurfacev2.h
Expand Up @@ -26,7 +26,7 @@ class QgsPolygonV2;
class CORE_EXPORT QgsSurfaceV2: public QgsAbstractGeometryV2
{
public:
virtual QgsPointV2 pointOnSurface() const = 0;

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

Expand Down

0 comments on commit 6122f04

Please sign in to comment.