Skip to content
Permalink
Browse files

Remove unused QgsGeometryFactory::fromRect method

  • Loading branch information
nyalldawson committed Sep 18, 2017
1 parent 9b6e79c commit 3d0d7aabece04150ba16acc42c879c46f6b1a6c1
Showing with 0 additions and 17 deletions.
  1. +0 −15 src/core/geometry/qgsgeometryfactory.cpp
  2. +0 −2 src/core/geometry/qgsgeometryfactory.h
@@ -196,21 +196,6 @@ std::unique_ptr< QgsMultiPolygonV2 > QgsGeometryFactory::fromMultiPolygon( const
return mp;
}

std::unique_ptr<QgsPolygonV2> QgsGeometryFactory::fromRect( const QgsRectangle &rect )
{
QgsPolyline ring;
ring.append( QgsPointXY( rect.xMinimum(), rect.yMinimum() ) );
ring.append( QgsPointXY( rect.xMaximum(), rect.yMinimum() ) );
ring.append( QgsPointXY( rect.xMaximum(), rect.yMaximum() ) );
ring.append( QgsPointXY( rect.xMinimum(), rect.yMaximum() ) );
ring.append( QgsPointXY( rect.xMinimum(), rect.yMinimum() ) );

QgsPolygon polygon;
polygon.append( ring );

return fromPolygon( polygon );
}

std::unique_ptr<QgsLineString> QgsGeometryFactory::linestringFromPolyline( const QgsPolyline &polyline )
{
QVector< double > x;
@@ -73,8 +73,6 @@ class CORE_EXPORT QgsGeometryFactory
static std::unique_ptr<QgsPolygonV2> fromPolygon( const QgsPolygon &polygon );
//! Construct geometry from a multipolygon
static std::unique_ptr<QgsMultiPolygonV2> fromMultiPolygon( const QgsMultiPolygon &multipoly );
//! Construct geometry from a rectangle
static std::unique_ptr<QgsPolygonV2> fromRect( const QgsRectangle &rect );
//! Return empty geometry from wkb type
static std::unique_ptr< QgsAbstractGeometry > geomFromWkbType( QgsWkbTypes::Type t );

0 comments on commit 3d0d7aa

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