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

Function reverse_3d

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

Source from the content-addressed store, hash-verified

78
79
80static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) {
81 struct vgridshiftData *Q = (struct vgridshiftData *) P->opaque;
82 PJ_COORD point = {{0,0,0,0}};
83 point.xyz = xyz;
84
85 if ( Q->defer_grid_opening ) {
86 Q->defer_grid_opening = false;
87 Q->grids = pj_vgrid_init(P, "grids");
88 deal_with_vertcon_gtx_hack(P);
89 if ( proj_errno(P) ) {
90 return proj_coord_error().lpz;
91 }
92 }
93
94 if (!Q->grids.empty()) {
95 /* Only try the gridshift if at least one grid is loaded,
96 * otherwise just pass the coordinate through unchanged. */
97 point.xyz.z -= pj_vgrid_value(P, Q->grids, point.lp, Q->forward_multiplier);
98 }
99
100 return point.lpz;
101}
102
103
104static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) {

Callers 1

reverse_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