Skip to content

Commit

Permalink
Merge pull request #4569 from rouault/importFromURN_iau
Browse files Browse the repository at this point in the history
importFromURN(): remove IAU specific hack if PROJ >= 8.2.0 (refs OSGeo/PROJ#2876)
  • Loading branch information
rouault authored Oct 5, 2021
2 parents cf363e4 + b09e2ae commit feba2e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gdal/ogr/ogrspatialreference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4020,6 +4020,9 @@ OGRErr OGRSpatialReference::importFromURN( const char *pszURN )

{
#if PROJ_AT_LEAST_VERSION(8,1,0)

// PROJ 8.2.0 has support for IAU codes now.
#if !PROJ_AT_LEAST_VERSION(8,2,0)
/* -------------------------------------------------------------------- */
/* Is this an IAU code? Lets try for the IAU2000 dictionary. */
/* -------------------------------------------------------------------- */
Expand All @@ -4035,6 +4038,8 @@ OGRErr OGRSpatialReference::importFromURN( const char *pszURN )
return importFromDict( "IAU2000.wkt", pszCode );
}
}
#endif

if( strlen(pszURN) >= 1000 )
{
CPLError(CE_Failure, CPLE_AppDefined, "Too long input string");
Expand Down

0 comments on commit feba2e9

Please sign in to comment.