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

Function forward_3d

ThirdParty/libproj/vtklibproj/src/transformations/hgridshift.cpp:28–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26} // anonymous namespace
27
28static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) {
29 auto Q = static_cast<hgridshiftData*>(P->opaque);
30 PJ_COORD point = {{0,0,0,0}};
31 point.lpz = lpz;
32
33 if ( Q->defer_grid_opening ) {
34 Q->defer_grid_opening = false;
35 Q->grids = pj_hgrid_init(P, "grids");
36 if ( proj_errno(P) ) {
37 return proj_coord_error().xyz;
38 }
39 }
40
41 if (!Q->grids.empty()) {
42 /* Only try the gridshift if at least one grid is loaded,
43 * otherwise just pass the coordinate through unchanged. */
44 point.lp = pj_hgrid_apply(P->ctx, Q->grids, point.lp, PJ_FWD);
45 }
46
47 return point.xyz;
48}
49
50
51static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) {

Callers 1

forward_4dFunction · 0.70

Calls 5

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

Tested by

no test coverage detected