diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-11-18 09:16:34 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-11-20 16:40:40 +0100 |
| commit | eb04ffca4c62d48378ff4c4ffe230de76d218b64 (patch) | |
| tree | 6ab83930ffa6cd9b3229cf2539b56214217bb23c /src/grids.cpp | |
| parent | 8e13c3acd86d1705ed865093f000835b51aec63e (diff) | |
| download | PROJ-eb04ffca4c62d48378ff4c4ffe230de76d218b64.tar.gz PROJ-eb04ffca4c62d48378ff4c4ffe230de76d218b64.zip | |
Remove unused pj_apply_gridshift()
Diffstat (limited to 'src/grids.cpp')
| -rw-r--r-- | src/grids.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/grids.cpp b/src/grids.cpp index 671485d7..8bb865d8 100644 --- a/src/grids.cpp +++ b/src/grids.cpp @@ -3443,49 +3443,3 @@ bool pj_bilinear_interpolation_three_samples( NS_PROJ_END -/************************************************************************/ -/* pj_apply_gridshift() */ -/* */ -/* This is the externally callable interface - part of the */ -/* public API - though it is not used internally any more and I */ -/* doubt it is used by any other applications. But we preserve */ -/* it to honour our public api. */ -/************************************************************************/ - -int pj_apply_gridshift(PJ_CONTEXT *ctx, const char *nadgrids, int inverse, - long point_count, int point_offset, double *x, double *y, - double * /*z */) - -{ - auto hgrids = NS_PROJ::getListOfGridSets(ctx, nadgrids); - if (hgrids.empty()) { - proj_context_errno_set(ctx, PJD_ERR_FAILED_TO_LOAD_GRID); - return 1; - } - - for (long i = 0; i < point_count; i++) { - PJ_LP input; - - long io = i * point_offset; - input.phi = y[io]; - input.lam = x[io]; - - auto output = - pj_hgrid_apply(ctx, hgrids, input, inverse ? PJ_INV : PJ_FWD); - - if (output.lam != HUGE_VAL) { - y[io] = output.phi; - x[io] = output.lam; - } else { - if (ctx->debug_level >= PJ_LOG_DEBUG_MAJOR) { - pj_log(ctx, PJ_LOG_DEBUG_MAJOR, - "pj_apply_gridshift(): failed to find a grid shift " - "table for\n" - " location (%.7fdW,%.7fdN)", - x[io] * RAD_TO_DEG, y[io] * RAD_TO_DEG); - } - } - } - - return 0; -} |
