From 5b1802b69a77ca8ba73ecbe2ec9e59b13d0af32f Mon Sep 17 00:00:00 2001
From: Victor Poughon <victor.poughon@cnes.fr>
Date: Wed, 24 Apr 2019 18:54:36 +0200
Subject: [PATCH] BUG: remove .Fixup() for GDAL 2.5 compatibility

---
 Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx b/Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx
index 012b04c2b6..19958c2971 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;
-- 
GitLab