MCPcopy Create free account
hub / github.com/Kitware/VTK / pj_hgrid_apply

Function pj_hgrid_apply

ThirdParty/libproj/vtklibproj/src/grids.cpp:3079–3109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3077// ---------------------------------------------------------------------------
3078
3079PJ_LP pj_hgrid_apply(PJ_CONTEXT *ctx, const ListOfHGrids &grids, PJ_LP lp,
3080 PJ_DIRECTION direction) {
3081 PJ_LP out;
3082
3083 out.lam = HUGE_VAL;
3084 out.phi = HUGE_VAL;
3085
3086 while (true) {
3087 HorizontalShiftGridSet *gridset = nullptr;
3088 const auto grid = findGrid(grids, lp, gridset);
3089 if (!grid) {
3090 proj_context_errno_set(ctx, PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID);
3091 return out;
3092 }
3093 if (grid->isNullGrid()) {
3094 return lp;
3095 }
3096
3097 bool shouldRetry = false;
3098 out = pj_hgrid_apply_internal(ctx, lp, direction, grid, gridset, grids,
3099 shouldRetry);
3100 if (!shouldRetry) {
3101 break;
3102 }
3103 }
3104
3105 if (out.lam == HUGE_VAL || out.phi == HUGE_VAL)
3106 proj_context_errno_set(ctx, PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID);
3107
3108 return out;
3109}
3110
3111/********************************************/
3112/* proj_hgrid_value() */

Callers 2

forward_3dFunction · 0.85
reverse_3dFunction · 0.85

Calls 4

findGridFunction · 0.85
proj_context_errno_setFunction · 0.85
pj_hgrid_apply_internalFunction · 0.85
isNullGridMethod · 0.45

Tested by

no test coverage detected