From f1dd367c64de4f48eb48f6dcf17c2be93c7eaafc Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 12 Feb 2018 16:45:09 +0100 Subject: Avoid invalid ellps error messages from pj_init (#794) Reset error type PJD_ERR_MAJOR_AXIS_NOT_GIVEN for operations that do not need an ellipsoid. --- src/pj_init.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/pj_init.c b/src/pj_init.c index bf098686..78486480 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -600,6 +600,8 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return pj_default_destructor (PIN, proj_errno(PIN)); } else { + if (PJD_ERR_MAJOR_AXIS_NOT_GIVEN==proj_errno (PIN)) + proj_errno_reset (PIN); PIN->f = 1.0/298.257223563; PIN->a_orig = PIN->a = 6378137.0; PIN->es_orig = PIN->es = PIN->f*(2-PIN->f); -- cgit v1.2.3