MCPcopy Create free account
hub / github.com/OSGeo/PROJ / pj_hgridshift_reverse_3d

Function pj_hgridshift_reverse_3d

src/transformations/hgridshift.cpp:53–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53static PJ_LPZ pj_hgridshift_reverse_3d(PJ_XYZ xyz, PJ *P) {
54 auto Q = static_cast<hgridshiftData *>(P->opaque);
55 PJ_COORD point = {{0, 0, 0, 0}};
56 point.xyz = xyz;
57
58 if (Q->defer_grid_opening) {
59 Q->defer_grid_opening = false;
60 Q->grids = pj_hgrid_init(P, "grids");
61 Q->error_code_in_defer_grid_opening = proj_errno(P);
62 }
63 if (Q->error_code_in_defer_grid_opening) {
64 proj_errno_set(P, Q->error_code_in_defer_grid_opening);
65 return proj_coord_error().lpz;
66 }
67
68 if (!Q->grids.empty()) {
69 /* Only try the gridshift if at least one grid is loaded,
70 * otherwise just pass the coordinate through unchanged. */
71 point.lp = pj_hgrid_apply(P->ctx, Q->grids, point.lp, PJ_INV);
72 }
73
74 return point.lpz;
75}
76
77static void pj_hgridshift_forward_4d(PJ_COORD &coo, PJ *P) {
78 struct hgridshiftData *Q = (struct hgridshiftData *)P->opaque;

Callers 1

pj_hgridshift_reverse_4dFunction · 0.85

Calls 6

pj_hgrid_initFunction · 0.85
proj_errnoFunction · 0.85
proj_errno_setFunction · 0.85
proj_coord_errorFunction · 0.85
pj_hgrid_applyFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected