Skip to content
Permalink
Browse files

Remove a downstream hack

  • Loading branch information
nyalldawson committed Dec 17, 2019
1 parent 1c34ae9 commit 4edab2b61d860ad04dd076590f318cd593f9feb9
Showing with 0 additions and 9 deletions.
  1. +0 −9 src/core/qgscoordinatereferencesystem.cpp
@@ -819,24 +819,15 @@ bool QgsCoordinateReferenceSystem::createFromProj( const QString &projString )
myProj4String.remove( QStringLiteral( "+type=crs" ) );
myProj4String = myProj4String.trimmed();

// hack!
#if PROJ_VERSION_MAJOR>=6
myProj4String.remove( QStringLiteral( "+towgs84=0,0,0,0,0,0,0" ) );
myProj4String = myProj4String.trimmed();
#endif

d->mIsValid = false;
d->mWkt.clear();

// broken on proj <= 6.1.0
#if PROJ_VERSION_MAJOR>=6
// first, try to use proj to do this for us...
const QString projCrsString = myProj4String + ( myProj4String.contains( QStringLiteral( "+type=crs" ) ) ? QString() : QStringLiteral( " +type=crs" ) );
QgsProjUtils::proj_pj_unique_ptr crs( proj_create( QgsProjContext::get(), projCrsString.toLatin1().constData() ) );
if ( crs )
{
//crs = QgsProjUtils::crsToSingleCrs( crs.get() ) ;

QString authName;
QString authCode;
if ( QgsProjUtils::identifyCrs( crs.get(), authName, authCode ) )

0 comments on commit 4edab2b

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