From 9a8c0d28982f3c31dc0f7c8a2f796c85ec801191 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Sat, 2 Feb 2019 00:35:24 +0100 Subject: [PATCH] avoid OSRFixup with GDAL >= 2.5 --- src/core/qgscoordinatereferencesystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/qgscoordinatereferencesystem.cpp b/src/core/qgscoordinatereferencesystem.cpp index 7ddd4baf37d..c26e9cadd36 100644 --- a/src/core/qgscoordinatereferencesystem.cpp +++ b/src/core/qgscoordinatereferencesystem.cpp @@ -638,8 +638,10 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &wkt ) { CPLFree( proj4src ); +#if GDAL_VERSION_NUM < GDAL_COMPUTE_VERSION(2,5,0) // try fixed up version OSRFixup( d->mCRS ); +#endif OSRExportToProj4( d->mCRS, &proj4src ); @@ -1176,9 +1178,11 @@ void QgsCoordinateReferenceSystem::setMapUnits() char *unitName = nullptr; +#if GDAL_VERSION_NUM < GDAL_COMPUTE_VERSION(2,5,0) // Of interest to us is that this call adds in a unit parameter if // one doesn't already exist. OSRFixup( d->mCRS ); +#endif if ( OSRIsProjected( d->mCRS ) ) {