From d7a16efe717cb45beba4375dedb9e78c94bc3438 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 19 Feb 2020 14:00:43 +0100 Subject: validateParameters(): fix false-positive warning on Equidistant Cylindrical We required the 'Latitude of natural origin' parameter to be present, but it is only a GDAL/PROJ specific thing, not a EPSG one. --- src/iso19111/coordinateoperation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/iso19111/coordinateoperation.cpp') diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp index 53fa64bf..f429c328 100644 --- a/src/iso19111/coordinateoperation.cpp +++ b/src/iso19111/coordinateoperation.cpp @@ -2129,6 +2129,14 @@ std::list SingleOperation::validateParameters() const { } if (!opv) { + if ((methodEPSGCode == EPSG_CODE_METHOD_EQUIDISTANT_CYLINDRICAL || + methodEPSGCode == + EPSG_CODE_METHOD_EQUIDISTANT_CYLINDRICAL_SPHERICAL) && + paramMapping == ¶mLatitudeNatOrigin) { + // extension of EPSG used by GDAL/PROJ, so we should not + // warn on its absence. + continue; + } std::string msg("Cannot find expected parameter "); msg += paramMapping->wkt2_name; res.emplace_back(msg); -- cgit v1.2.3