Skip to content

Commit

Permalink
Fix wkt import for QgsCurvePolygonV2. Backport to 2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Mar 26, 2017
1 parent fc425b2 commit 36080d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/geometry/qgscurvepolygonv2.cpp
Expand Up @@ -158,10 +158,13 @@ bool QgsCurvePolygonV2::fromWkt( const QString& wkt )
{
QPair<QgsWKBTypes::Type, QString> childParts = QgsGeometryUtils::wktReadBlock( childWkt );

if ( QgsWKBTypes::flatType( childParts.first ) == QgsWKBTypes::LineString )
QgsWKBTypes::Type flatCurveType = QgsWKBTypes::flatType( childParts.first );
if ( flatCurveType == QgsWKBTypes::LineString )
mInteriorRings.append( new QgsLineStringV2() );
else if ( QgsWKBTypes::flatType( childParts.first ) == QgsWKBTypes::CircularString )
else if ( flatCurveType == QgsWKBTypes::CircularString )
mInteriorRings.append( new QgsCircularStringV2() );
else if ( flatCurveType == QgsWKBTypes::CompoundCurve )
mInteriorRings.append( new QgsCompoundCurveV2() );
else
{
clear();
Expand Down

0 comments on commit 36080d6

Please sign in to comment.