aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-12-16 22:07:53 +0100
committerEven Rouault <even.rouault@spatialys.com>2021-12-16 22:08:17 +0100
commite210258e679094159791aa2eeb36a53ab270ce4c (patch)
tree65ca4a5cc34fa37f3cbf7c11660ce7522800152b /src
parent2072894385205dc9e24aa86ad3da820391f5f002 (diff)
downloadPROJ-e210258e679094159791aa2eeb36a53ab270ce4c.tar.gz
PROJ-e210258e679094159791aa2eeb36a53ab270ce4c.zip
WKTParser::Private::buildProjectionStandard(): minor cleanup
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/io.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp
index fde56d66..4dcceba2 100644
--- a/src/iso19111/io.cpp
+++ b/src/iso19111/io.cpp
@@ -3894,13 +3894,12 @@ ConversionNNPtr WKTParser::Private::buildProjectionStandard(
if (mapping &&
mapping->epsg_code == EPSG_CODE_METHOD_MERCATOR_VARIANT_B &&
ci_equal(parameterName, "latitude_of_origin")) {
- for (size_t idx = 0; mapping->params[idx] != nullptr; ++idx) {
- if (mapping->params[idx]->epsg_code ==
- EPSG_CODE_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN) {
- foundParameters[idx] = true;
- break;
- }
- }
+ // Some illegal formulations of Mercator_2SP have a unexpected
+ // latitude_of_origin parameter. We accept it on import, but
+ // do not accept it when exporting to PROJ string, unless it is
+ // zero.
+ // No need to try to update foundParameters[] as this is a
+ // unexpected one.
parameterName = EPSG_NAME_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN;
propertiesParameter.set(
Identifier::CODE_KEY,