mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Fix compoundcurve parser
This commit is contained in:
parent
68a5d1a994
commit
2dc40ae039
@ -467,11 +467,13 @@ std::unique_ptr< QgsCompoundCurve > QgsMssqlGeometryParser::readCompoundCurve( i
|
||||
switch ( SegmentType( mSegment ) )
|
||||
{
|
||||
case SMT_FIRSTLINE:
|
||||
if ( isCurve )
|
||||
poCompoundCurve->addCurve( readCircularString( iPoint - nPointsPrepared, iPoint + 1 ).release() );
|
||||
else
|
||||
poCompoundCurve->addCurve( readLineString( iPoint - nPointsPrepared, iPoint + 1 ).release() );
|
||||
|
||||
if (nPointsPrepared > 0)
|
||||
{
|
||||
if ( isCurve )
|
||||
poCompoundCurve->addCurve( readCircularString( iPoint - nPointsPrepared, iPoint + 1 ).release() );
|
||||
else
|
||||
poCompoundCurve->addCurve( readLineString( iPoint - nPointsPrepared, iPoint + 1 ).release() );
|
||||
}
|
||||
isCurve = false;
|
||||
nPointsPrepared = 1;
|
||||
++iPoint;
|
||||
@ -481,11 +483,13 @@ std::unique_ptr< QgsCompoundCurve > QgsMssqlGeometryParser::readCompoundCurve( i
|
||||
++iPoint;
|
||||
break;
|
||||
case SMT_FIRSTARC:
|
||||
if ( isCurve )
|
||||
poCompoundCurve->addCurve( readCircularString( iPoint - nPointsPrepared, iPoint + 1 ).release() );
|
||||
else
|
||||
poCompoundCurve->addCurve( readLineString( iPoint - nPointsPrepared, iPoint + 1 ).release() );
|
||||
|
||||
if ( nPointsPrepared > 0 )
|
||||
{
|
||||
if ( isCurve )
|
||||
poCompoundCurve->addCurve( readCircularString( iPoint - nPointsPrepared, iPoint + 1 ).release() );
|
||||
else
|
||||
poCompoundCurve->addCurve( readLineString( iPoint - nPointsPrepared, iPoint + 1 ).release() );
|
||||
}
|
||||
isCurve = true;
|
||||
nPointsPrepared = 2;
|
||||
iPoint += 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user