Skip to content
Permalink
Browse files

Use authid() to retrieve authority and srid

  • Loading branch information
stefanuhrig committed Jan 8, 2021
1 parent 34f2005 commit 55e146f16cf5afd540ef6976fcd9a4c62f65054e
Showing with 0 additions and 13 deletions.
  1. +0 −13 src/providers/hana/qgshanacrsutils.cpp
@@ -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;

0 comments on commit 55e146f

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