diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-03-20 21:47:48 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2018-03-20 21:48:40 +0100 |
| commit | 60b08570aa47be15bf5e41745a0a00c22304c41d (patch) | |
| tree | 42239f05fc4a32f93630e1f2627db1409ccf13f9 /src | |
| parent | 0cfa57cc578a7a6dc8472799732a3828beb841a7 (diff) | |
| download | PROJ-60b08570aa47be15bf5e41745a0a00c22304c41d.tar.gz PROJ-60b08570aa47be15bf5e41745a0a00c22304c41d.zip | |
Introduce late expansion of +datum parameters. Fixes #872.
Diffstat (limited to 'src')
| -rw-r--r-- | src/pj_init.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pj_init.c b/src/pj_init.c index 2d549317..e5b1441a 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -590,9 +590,12 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { PIN->vgridlist_geoid = NULL; PIN->vgridlist_geoid_count = 0; - /* Set datum parameters */ - if (pj_datum_set(ctx, start, PIN)) - return pj_default_destructor (PIN, proj_errno(PIN)); + /* Set datum parameters. Similarly to +init parameters we want to expand */ + /* +datum parameters as late as possible when dealing with pipelines. */ + /* otherwise only the first occurrence of +datum will be expanded and that */ + if (n_pipelines == 0) + if (pj_datum_set(ctx, start, PIN)) + return pj_default_destructor (PIN, proj_errno(PIN)); err = pj_ellipsoid (PIN); |
