aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-12-05 21:51:13 +0100
committerGitHub <noreply@github.com>2018-12-05 21:51:13 +0100
commit095d44a4a6dd4244bd8c42b28ee1a3bb521fe4b9 (patch)
treeac99afb2d03d92ac1448df79dbf069beb359a546 /src
parent06fee25ae66aa6aac9955731b684fc3323de830f (diff)
parent9e90e82012fe67c8310318654a65a145acc967aa (diff)
downloadPROJ-095d44a4a6dd4244bd8c42b28ee1a3bb521fe4b9.tar.gz
PROJ-095d44a4a6dd4244bd8c42b28ee1a3bb521fe4b9.zip
Merge pull request #1192 from kbevers/master
Allow ellipsoid flattening to be set to zero
Diffstat (limited to 'src')
-rw-r--r--src/pj_ell_set.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pj_ell_set.c b/src/pj_ell_set.c
index 6c89ea0d..e2d2750c 100644
--- a/src/pj_ell_set.c
+++ b/src/pj_ell_set.c
@@ -258,9 +258,8 @@ static int ellps_shape (PJ *P) {
P->f = pj_atof (pj_param_value (par));
if (HUGE_VAL==P->f)
return proj_errno_set (P, PJD_ERR_INVALID_ARG);
- if (0==P->f)
- return proj_errno_set (P, PJD_ERR_INVALID_ARG);
- P->rf = 1 / P->f;
+
+ P->rf = P->f != 0.0 ? 1.0/P->f: HUGE_VAL;
P->es = 2*P->f - P->f*P->f;
break;