Skip to content
Permalink
Browse files

When adding ring to a geometry, add z or m dimensions to the

ring geometry if required (fix #7400, #7401)
  • Loading branch information
nyalldawson committed Oct 13, 2015
1 parent a333fc8 commit 957d82698d893c4a0e95c0ac887231b26d894bbb
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/geometry/qgsgeometryeditutils.cpp
@@ -81,6 +81,13 @@ int QgsGeometryEditUtils::addRing( QgsAbstractGeometryV2* geom, QgsCurveV2* ring
delete ring; return 4;
}
}

//make sure dimensionality of ring matches geometry
if ( QgsWKBTypes::hasZ( geom->wkbType() ) )
ring->addZValue( 0 );
if ( QgsWKBTypes::hasM( geom->wkbType() ) )
ring->addMValue( 0 );

( *polyIter )->addInteriorRing( ring );
return 0; //success
}

0 comments on commit 957d826

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