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

Function forward_3d

ThirdParty/libproj/vtklibproj/src/transformations/vgridshift.cpp:56–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) {
57 struct vgridshiftData *Q = (struct vgridshiftData *) P->opaque;
58 PJ_COORD point = {{0,0,0,0}};
59 point.lpz = lpz;
60
61 if ( Q->defer_grid_opening ) {
62 Q->defer_grid_opening = false;
63 Q->grids = pj_vgrid_init(P, "grids");
64 deal_with_vertcon_gtx_hack(P);
65 if ( proj_errno(P) ) {
66 return proj_coord_error().xyz;
67 }
68 }
69
70 if (!Q->grids.empty()) {
71 /* Only try the gridshift if at least one grid is loaded,
72 * otherwise just pass the coordinate through unchanged. */
73 point.xyz.z += pj_vgrid_value(P, Q->grids, point.lp, Q->forward_multiplier);
74 }
75
76 return point.xyz;
77}
78
79
80static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) {

Callers 1

forward_4dFunction · 0.70

Calls 6

pj_vgrid_initFunction · 0.85
proj_errnoFunction · 0.85
proj_coord_errorFunction · 0.85
pj_vgrid_valueFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected