Skip to content
Permalink
Browse files

Fix adding curves with Z/M to non Z/M compound curves

Z/M for these curves should be dropped to ensure consistent
dimensionality for the whole compound curve
  • Loading branch information
nyalldawson committed Sep 21, 2017
1 parent f268ccc commit 148a906cb546b3c38edb2cb9b98e5d4c3fdd9edc
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/geometry/qgscompoundcurve.cpp
@@ -407,10 +407,18 @@ void QgsCompoundCurve::addCurve( QgsCurve *c )
{
c->addZValue();
}
else if ( !QgsWkbTypes::hasZ( mWkbType ) && QgsWkbTypes::hasZ( c->wkbType() ) )
{
c->dropZValue();
}
if ( QgsWkbTypes::hasM( mWkbType ) && !QgsWkbTypes::hasM( c->wkbType() ) )
{
c->addMValue();
}
else if ( !QgsWkbTypes::hasM( mWkbType ) && QgsWkbTypes::hasM( c->wkbType() ) )
{
c->dropMValue();
}
clearCache();
}
}

0 comments on commit 148a906

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