diff --git a/Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx b/Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx index 012b04c2b6d78f9c1df7cebc4eee57bb7dd97682..19958c297110bb1920f4f547686e6dcfdb0daa14 100644 --- a/Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx @@ -200,7 +200,9 @@ unsigned int SpatialReference::ToEPSG() const OGRSpatialReferencePtr tmpSRS(m_SR->Clone()); +#if GDAL_VERSION_NUM < 2050000 tmpSRS->Fixup(); +#endif tmpSRS->AutoIdentifyEPSG(); const char * epsg = nullptr;