Skip to content

Commit

Permalink
OGRSpatialReference::importFromWkt(): fix compatibilty with PROJ mast…
Browse files Browse the repository at this point in the history
…er 9.2.0dev

OSGeo/PROJ#3488 added a PJ_TYPE_DERIVED_PROJECTED_CRS
value to the PJ_TYPE enumeration that we didn't test obviously. But
better just use proj_is_crs() to be more robust.
  • Loading branch information
rouault committed Nov 25, 2022
1 parent 26b8876 commit 5e44107
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions ogr/ogrspatialreference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1953,18 +1953,7 @@ OGRErr OGRSpatialReference::importFromWkt( const char ** ppszInput,
return OGRERR_CORRUPT_DATA;

// Only accept CRS objects
const auto type = d->m_pjType;
if( type != PJ_TYPE_GEODETIC_CRS &&
type != PJ_TYPE_GEOCENTRIC_CRS &&
type != PJ_TYPE_GEOGRAPHIC_2D_CRS &&
type != PJ_TYPE_GEOGRAPHIC_3D_CRS &&
type != PJ_TYPE_VERTICAL_CRS &&
type != PJ_TYPE_PROJECTED_CRS &&
type != PJ_TYPE_COMPOUND_CRS &&
type != PJ_TYPE_TEMPORAL_CRS &&
type != PJ_TYPE_ENGINEERING_CRS &&
type != PJ_TYPE_BOUND_CRS &&
type != PJ_TYPE_OTHER_CRS )
if( !proj_is_crs(d->m_pj_crs) )
{
Clear();
return OGRERR_CORRUPT_DATA;
Expand Down

0 comments on commit 5e44107

Please sign in to comment.