Skip to content

Commit 0f315e4

Browse files
committed
avoid OSRFixup with GDAL >= 2.5 (fixes #21902)
(cherry picked from commit 9a8c0d2)
1 parent adb646f commit 0f315e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/qgscoordinatereferencesystem.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,10 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &wkt )
637637
{
638638
CPLFree( proj4src );
639639

640+
#if GDAL_VERSION_NUM < GDAL_COMPUTE_VERSION(2,5,0)
640641
// try fixed up version
641642
OSRFixup( d->mCRS );
643+
#endif
642644

643645
OSRExportToProj4( d->mCRS, &proj4src );
644646

@@ -1175,9 +1177,11 @@ void QgsCoordinateReferenceSystem::setMapUnits()
11751177

11761178
char *unitName = nullptr;
11771179

1180+
#if GDAL_VERSION_NUM < GDAL_COMPUTE_VERSION(2,5,0)
11781181
// Of interest to us is that this call adds in a unit parameter if
11791182
// one doesn't already exist.
11801183
OSRFixup( d->mCRS );
1184+
#endif
11811185

11821186
if ( OSRIsProjected( d->mCRS ) )
11831187
{

0 commit comments

Comments
 (0)