Skip to content

Commit

Permalink
Use authid() to retrieve authority and srid
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanuhrig committed Jan 8, 2021
1 parent 34f2005 commit 55e146f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/providers/hana/qgshanacrsutils.cpp
Expand Up @@ -78,24 +78,11 @@ bool QgsHanaCrsUtils::identifyCrs( const QgsCoordinateReferenceSystem &crs, QStr
QString authName;
QString authCode;

#if PROJ_VERSION_MAJOR>=6
PJ *pjCrs = crs.projObject();
if ( !pjCrs )
return false;
authName = proj_get_id_auth_name( pjCrs, 0 );
authCode = proj_get_id_code( pjCrs, 0 );
if ( authName.isEmpty() || authCode.isEmpty() )
{
if ( !QgsProjUtils::identifyCrs( pjCrs, authName, authCode, QgsProjUtils::FlagMatchBoundCrsToUnderlyingSourceCrs ) )
return false;
}
#else
QStringList sl = crs.authid().split( ':' );
if ( sl.length() != 2 )
return false;
authName = sl[0];
authCode = sl[1];
#endif

if ( authName.isEmpty() )
return false;
Expand Down

0 comments on commit 55e146f

Please sign in to comment.