From 048cd320b4e63b9378cf6332c8bff11f03a6c39b Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 13 Dec 2018 15:51:12 +0100 Subject: import from WKT1 and PROJ string: tune CS for Polar LAEA --- src/io.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/io.cpp') diff --git a/src/io.cpp b/src/io.cpp index 1700b1e3..71d029ea 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -3477,7 +3477,9 @@ WKTParser::Private::buildProjectedCRS(const WKTNodeNNPtr &node) { emptyString, AxisDirection::WEST, linearUnit)) .as_nullable(); } else if (methodCode == - EPSG_CODE_METHOD_POLAR_STEREOGRAPHIC_VARIANT_A) { + EPSG_CODE_METHOD_POLAR_STEREOGRAPHIC_VARIANT_A || + methodCode == + EPSG_CODE_METHOD_LAMBERT_AZIMUTHAL_EQUAL_AREA) { // It is likely that the ESRI definition of EPSG:32661 (UPS North) & // EPSG:32761 (UPS South) uses the easting-northing order, instead // of the EPSG northing-easting order. @@ -6585,6 +6587,17 @@ CRSNNPtr PROJStringParser::Private::buildProjectedCRS( } else { mapping = getMapping(PROJ_WKT2_NAME_METHOD_STEREOGRAPHIC); } + } else if (step.name == "laea") { + if (hasParamValue(step, "lat_0") && + std::fabs(std::fabs(getAngularValue(getParamValue(step, "lat_0"))) - + 90.0) < 1e-10) { + const double lat_0 = getAngularValue(getParamValue(step, "lat_0")); + if (lat_0 > 0) { + axisType = AxisType::NORTH_POLE; + } else { + axisType = AxisType::SOUTH_POLE; + } + } } UnitOfMeasure unit = buildUnit(step, "units", "to_meter"); -- cgit v1.2.3