Skip to content
Permalink
Browse files

Fix incorrectly ellipsoid acronym returned when creating a CRS from a…

… custom non-standard proj string on proj 6+ builds
  • Loading branch information
nyalldawson committed Dec 17, 2019
1 parent 5cfa662 commit 1c34ae9c3b2247ee74b5f2647d95b327a50e091a
@@ -1399,14 +1399,7 @@ void QgsCoordinateReferenceSystem::setProjString( const QString &proj4String )
}
else
{
QgsProjUtils::proj_pj_unique_ptr ellipsoid( proj_get_ellipsoid( ctx, d->mPj.get() ) );
if ( ellipsoid )
{
const QString ellipsoidAuthName( proj_get_id_auth_name( ellipsoid.get(), 0 ) );
const QString ellipsoidAuthCode( proj_get_id_code( ellipsoid.get(), 0 ) );
d->mEllipsoidAcronym = QStringLiteral( "%1:%2" ).arg( ellipsoidAuthName, ellipsoidAuthCode );
}

d->mEllipsoidAcronym.clear();
d->mIsValid = true;
}
#else
@@ -439,7 +439,7 @@ void TestQgsCoordinateReferenceSystem::fromProj4EPSG20936()
QCOMPARE( crs.authid(), QStringLiteral( "EPSG:20936" ) );
#endif

QCOMPARE( crs.ellipsoidAcronym(), QStringLiteral( "EPSG:7013" ) );
QCOMPARE( crs.ellipsoidAcronym(), QStringLiteral( "PARAMETER:6378249.14499999955296516:6356514.96639875322580338" ) );
#endif
}

0 comments on commit 1c34ae9

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