Skip to content

Commit

Permalink
Fix exportToWkt() after morphToESRI() on Geographic/Projected 3D CRS.…
Browse files Browse the repository at this point in the history
… But only works with PROJ 7.2 / OSGeo/PROJ#2389
  • Loading branch information
rouault committed Oct 23, 2020
1 parent ee1acc4 commit 4edc433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gdal/ogr/ogrspatialreference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,10 +1469,10 @@ OGRErr OGRSpatialReference::exportToWkt( char ** ppszResult,
}

auto ctxt = d->getPROJContext();
auto wktFormat = d->m_bMorphToESRI ? PJ_WKT1_ESRI : PJ_WKT1_GDAL;
auto wktFormat = PJ_WKT1_GDAL;
const char* pszFormat = CSLFetchNameValueDef(papszOptions, "FORMAT",
CPLGetConfigOption("OSR_WKT_FORMAT", ""));
if( EQUAL(pszFormat, "WKT1_ESRI" ) )
if( EQUAL(pszFormat, "WKT1_ESRI" ) || d->m_bMorphToESRI )
{
wktFormat = PJ_WKT1_ESRI;
}
Expand Down

0 comments on commit 4edc433

Please sign in to comment.