aboutsummaryrefslogtreecommitdiff
path: root/src/io.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-12-13 16:23:01 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-12-13 16:30:48 +0100
commit13625a0c3f5a8a1b3a6ac63b4f49234a3722f62c (patch)
treeaf44cafeaff73b6843576222e2b8bafefb8425ae /src/io.cpp
parent048cd320b4e63b9378cf6332c8bff11f03a6c39b (diff)
downloadPROJ-13625a0c3f5a8a1b3a6ac63b4f49234a3722f62c.tar.gz
PROJ-13625a0c3f5a8a1b3a6ac63b4f49234a3722f62c.zip
Tune behaviour for LAEA vs LAEA Spherical or EQC vs EQC Spherical
Diffstat (limited to 'src/io.cpp')
-rw-r--r--src/io.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/io.cpp b/src/io.cpp
index 71d029ea..caf9b53d 100644
--- a/src/io.cpp
+++ b/src/io.cpp
@@ -6500,8 +6500,7 @@ CRSNNPtr PROJStringParser::Private::buildProjectedCRS(
}
} else if (step.name == "aeqd" && hasParamValue(step, "guam")) {
mapping = getMapping(EPSG_CODE_METHOD_GUAM_PROJECTION);
- } else if (step.name == "cea" &&
- !geogCRS->datum()->ellipsoid()->isSphere()) {
+ } else if (step.name == "cea" && !geogCRS->ellipsoid()->isSphere()) {
mapping = getMapping(EPSG_CODE_METHOD_LAMBERT_CYLINDRICAL_EQUAL_AREA);
} else if (step.name == "geos" && getParamValue(step, "sweep") == "x") {
mapping =
@@ -6598,6 +6597,15 @@ CRSNNPtr PROJStringParser::Private::buildProjectedCRS(
axisType = AxisType::SOUTH_POLE;
}
}
+ if (geogCRS->ellipsoid()->isSphere()) {
+ mapping = getMapping(
+ EPSG_CODE_METHOD_LAMBERT_AZIMUTHAL_EQUAL_AREA_SPHERICAL);
+ }
+ } else if (step.name == "eqc") {
+ if (geogCRS->ellipsoid()->isSphere()) {
+ mapping =
+ getMapping(EPSG_CODE_METHOD_EQUIDISTANT_CYLINDRICAL_SPHERICAL);
+ }
}
UnitOfMeasure unit = buildUnit(step, "units", "to_meter");