diff options
| author | Thomas Knudsen <thokn@sdfe.dk> | 2018-02-10 12:00:15 +0100 |
|---|---|---|
| committer | Thomas Knudsen <thokn@sdfe.dk> | 2018-02-10 12:00:15 +0100 |
| commit | 82cbab19db5ec8fd7b2fec7f6faf75993381f105 (patch) | |
| tree | 692c581df15268bd612dc59283c1c5cdc01f40fd | |
| parent | a1ce77b609e7a132ab2b4d4673d8abb6e1f6b28d (diff) | |
| download | PROJ-82cbab19db5ec8fd7b2fec7f6faf75993381f105.tar.gz PROJ-82cbab19db5ec8fd7b2fec7f6faf75993381f105.zip | |
pj_init: set ellipsoid if given, even if not needed
| -rw-r--r-- | src/pj_init.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pj_init.c b/src/pj_init.c index 0acc6c71..f54a2a92 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -593,12 +593,12 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { if (pj_datum_set(ctx, start, PIN)) return pj_default_destructor (PIN, proj_errno(PIN)); - if (PIN->need_ellps) { - int ret = pj_ellipsoid (PIN); - if (0 != ret) { - pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere"); - return pj_default_destructor (PIN, proj_errno(PIN)); - } + err = pj_ellipsoid (PIN); + if (PIN->need_ellps && 0 != err) { + pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere"); + return pj_default_destructor (PIN, proj_errno(PIN)); + } + if (0==err) { PIN->a_orig = PIN->a; PIN->es_orig = PIN->es; if (pj_calc_ellipsoid_params (PIN, PIN->a, PIN->es)) |
