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

Function pj_approx_3D_trans

src/internal.cpp:100–127  ·  view source on GitHub ↗

/

Source from the content-addressed store, hash-verified

98
99/**************************************************************************************/
100PJ_COORD pj_approx_3D_trans(PJ *P, PJ_DIRECTION direction, PJ_COORD coo) {
101 /***************************************************************************************
102 Companion to pj_approx_2D_trans.
103
104 Behave mostly as proj_trans, but attempt to use 3D interfaces only.
105 Used in gie.c, to enforce testing 3D code, and by PJ_pipeline.c to implement
106 chained calls starting out with a call to its 3D interface.
107 ***************************************************************************************/
108 if (nullptr == P)
109 return coo;
110 if (P->inverted)
111 direction = static_cast<PJ_DIRECTION>(-direction);
112 switch (direction) {
113 case PJ_FWD: {
114 const auto xyz = pj_fwd3d(coo.lpz, P);
115 coo.xyz = xyz;
116 return coo;
117 }
118 case PJ_INV: {
119 const auto lpz = pj_inv3d(coo.xyz, P);
120 coo.lpz = lpz;
121 return coo;
122 }
123 case PJ_IDENT:
124 break;
125 }
126 return coo;
127}
128
129/**************************************************************************************/
130int pj_has_inverse(PJ *P) {

Callers 1

pipeline_forward_3dFunction · 0.85

Calls 2

pj_fwd3dFunction · 0.85
pj_inv3dFunction · 0.85

Tested by

no test coverage detected