Skip to content
Permalink
Browse files
Fix getOperationAndEllipsoidFromProjString
to properly import ellipsoid_acronym in tbl_srs and satisfy the NOT NULL constraint when QgsCoordinateReferenceSystem::syncDatabase() is executed.
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Jun 13, 2021
1 parent 64a7234 commit ca11a1eb010316d888d36376304d09848cdbc7e0
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/core/proj/qgscoordinatereferencesystem.cpp
@@ -2122,8 +2122,7 @@ void getOperationAndEllipsoidFromProjString( const QString &proj, QString &opera

thread_local const QRegularExpression ellipseRegExp( QStringLiteral( "\\+(?:ellps|datum)=(\\S+)" ) );
const QRegularExpressionMatch ellipseMatch = projRegExp.match( proj );
QString ellps;
if ( !ellipseMatch.hasMatch() )
if ( ellipseMatch.hasMatch() )
{
ellipsoid = ellipseMatch.captured( 1 );
}
@@ -2134,7 +2133,7 @@ void getOperationAndEllipsoidFromProjString( const QString &proj, QString &opera
// and will result in oddities within other areas of QGIS (e.g. project ellipsoid won't be correctly
// set for these CRSes). Better just hack around and make the constraint happy for now,
// and hope that the definitions get corrected in future.
ellipsoid.clear();
ellipsoid = "";
}
}

0 comments on commit ca11a1e

Please sign in to comment.