Skip to content

Commit

Permalink
importFromURN(): remove IAU specific hack if PROJ >= 8.2.0 (refs OSGe…
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Sep 29, 2021
1 parent 3f2c47e commit b09e2ae
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 b09e2ae

Please sign in to comment.