From 97bbfe32aacc361a5c34bcb2c5045c977d21de4b Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 5 Dec 2019 13:32:16 +0100 Subject: import from PROJ string CRS: better deal with strings that look like Google Mercator projection, but with subtlely different parameters (fixes https://github.com/OSGeo/gdal/issues/2087) --- src/iso19111/io.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 0d98e2de..2aec5fac 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -8582,7 +8582,11 @@ CRSNNPtr PROJStringParser::Private::buildProjectedCRS( break; } } - if (getNumericValue(getParamValue(step, "a")) == 6378137) { + if (getNumericValue(getParamValue(step, "a")) == 6378137 && + getAngularValue(getParamValue(step, "lon_0")) == 0.0 && + getAngularValue(getParamValue(step, "lat_0")) == 0.0 && + getAngularValue(getParamValue(step, "x_0")) == 0.0 && + getAngularValue(getParamValue(step, "y_0")) == 0.0) { bWebMercator = true; } } else if (hasParamValue(step, "lat_ts")) { -- cgit v1.2.3