aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-02-19 08:15:57 +0100
committerGitHub <noreply@github.com>2019-02-19 08:15:57 +0100
commit942722214e0b94bd848dac21c8e21923cf9f1c04 (patch)
tree9e49a7b998f27b5a11bff304461baa836212420a /src
parent97016c7f7b74bd473c446ee128d1774209eddfc0 (diff)
parent2b1cf12bf36e536cd29994951b46f180e81e1179 (diff)
downloadPROJ-942722214e0b94bd848dac21c8e21923cf9f1c04.tar.gz
PROJ-942722214e0b94bd848dac21c8e21923cf9f1c04.zip
Merge pull request #1278 from rouault/fix_issues_i386_build
Fix a few issues with i386 builds
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/io.cpp6
-rw-r--r--src/projections/laea.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp
index 6edce579..e14239b0 100644
--- a/src/iso19111/io.cpp
+++ b/src/iso19111/io.cpp
@@ -6920,7 +6920,11 @@ CRSNNPtr PROJStringParser::Private::buildProjectedCRS(
const auto &lat_2 = getParamValue(step, "lat_2");
const auto &k = getParamValueK(step);
if (lat_2.empty() && !lat_0.empty() && !lat_1.empty() &&
- getAngularValue(lat_0) == getAngularValue(lat_1)) {
+ (lat_0 == lat_1 ||
+ // For some reason with gcc 5.3.1-14ubuntu2 32bit, the following
+ // comparison returns false even if lat_0 == lat_1. Smells like
+ // a compiler bug
+ getAngularValue(lat_0) == getAngularValue(lat_1))) {
mapping = getMapping(EPSG_CODE_METHOD_LAMBERT_CONIC_CONFORMAL_1SP);
} else if (!k.empty() && getNumericValue(k) != 1.0) {
mapping = getMapping(
diff --git a/src/projections/laea.cpp b/src/projections/laea.cpp
index e3c7248a..22fb1691 100644
--- a/src/projections/laea.cpp
+++ b/src/projections/laea.cpp
@@ -82,7 +82,7 @@ eqcon:
break;
case N_POLE:
case S_POLE:
- if (q >= 0.) {
+ if (q >= 1e-15) {
b = sqrt(q);
xy.x = b * sinlam;
xy.y = coslam * (Q->mode == S_POLE ? b : -b);