Skip to content
Permalink
Browse files

avoid OSRFixup with GDAL >= 2.5

  • Loading branch information
jef-n committed Feb 1, 2019
1 parent 122d5c3 commit 9a8c0d28982f3c31dc0f7c8a2f796c85ec801191
Showing with 4 additions and 0 deletions.
  1. +4 −0 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 ) )
{

0 comments on commit 9a8c0d2

Please sign in to comment.
You can’t perform that action at this time.