From b6db297c5a7c78727bd27978b8022cb21bdae999 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 23 Jan 2020 18:31:32 +0100 Subject: Fix wrong use of derivingConversionRef() that caused GDAL bug Hopefully final cut at solving the same class of bug that the one that affected QGIS in December. This time, this hit GDAL in the situation of https://lists.osgeo.org/pipermail/gdal-dev/2020-January/051500.html The bug fix for that particular issue is in PROJStringParser::createFromPROJString() But grepping more in the code base, I could find other potential smelly situations (might not be issues, but better be safe than sorry), so let's fix them too. Bottom line is: derivingConversionRef() should *only* be used for consultation, and never to create a new ProjectedCRS() --- src/iso19111/c_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/iso19111/c_api.cpp') diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp index 4c98af3d..67050725 100644 --- a/src/iso19111/c_api.cpp +++ b/src/iso19111/c_api.cpp @@ -3574,7 +3574,7 @@ PJ *proj_crs_create_projected_3D_crs_from_2D(PJ_CONTEXT *ctx, crs_name ? crs_name : cpp_projected_2D_crs->nameStr().c_str()), NN_NO_CHECK(cpp_geog_3D_CRS), - cpp_projected_2D_crs->derivingConversionRef(), newCS)); + cpp_projected_2D_crs->derivingConversion(), newCS)); } catch (const std::exception &e) { proj_log_error(ctx, __FUNCTION__, e.what()); if (ctx->cpp_context) { -- cgit v1.2.3