diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-12-14 18:46:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-14 18:46:37 +0100 |
| commit | 6125d3b5a488d6dbaa536d0bde9125a63c1dc91a (patch) | |
| tree | 0b2df21df95a23fd3ab01f5f44309fd2aa2c0781 /src/apply_gridshift.cpp | |
| parent | 0f7a93138f9652e920521d09e7c73790e0cae65f (diff) | |
| parent | 6a4f9cc673e247e1ca76e94d7b1aaaf3e0648c13 (diff) | |
| download | PROJ-6125d3b5a488d6dbaa536d0bde9125a63c1dc91a.tar.gz PROJ-6125d3b5a488d6dbaa536d0bde9125a63c1dc91a.zip | |
Merge pull request #1797 from rouault/fix_hgrid_inv_switch_between_ntv2_subgrids
Horizontal grid shift: fix issue on iterative inverse computation when switching between (sub)grids (fixes #1663)
Diffstat (limited to 'src/apply_gridshift.cpp')
| -rw-r--r-- | src/apply_gridshift.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/apply_gridshift.cpp b/src/apply_gridshift.cpp index e6c7b2b1..39e7c3b5 100644 --- a/src/apply_gridshift.cpp +++ b/src/apply_gridshift.cpp @@ -115,7 +115,7 @@ int pj_apply_gridshift_2( PJ *defn, int inverse, /* Determine which grid is the correct given an input coordinate. */ /************************************************************************/ -static struct CTABLE* find_ctable(projCtx ctx, PJ_LP input, int grid_count, PJ_GRIDINFO **tables) { +struct CTABLE* find_ctable(projCtx ctx, PJ_LP input, int grid_count, PJ_GRIDINFO **tables) { int itable; /* keep trying till we find a table that works */ @@ -210,7 +210,7 @@ int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **gridlist, int gridlist_coun ct = find_ctable(ctx, input, gridlist_count, gridlist); if( ct != nullptr ) { - output = nad_cvt( input, inverse, ct ); + output = nad_cvt( ctx, input, inverse, ct, gridlist_count, gridlist); if ( output.lam != HUGE_VAL && debug_count++ < 20 ) pj_log( ctx, PJ_LOG_DEBUG_MINOR, "pj_apply_gridshift(): used %s", ct->id ); @@ -356,7 +356,7 @@ PJ_LP proj_hgrid_apply(PJ *P, PJ_LP lp, PJ_DIRECTION direction) { } inverse = direction == PJ_FWD ? 0 : 1; - out = nad_cvt(lp, inverse, ct); + out = nad_cvt(P->ctx, lp, inverse, ct, P->gridlist_count, P->gridlist); if (out.lam == HUGE_VAL || out.phi == HUGE_VAL) pj_ctx_set_errno(P->ctx, PJD_ERR_GRID_AREA); |
