/
| 98 | |
| 99 | /**************************************************************************************/ |
| 100 | PJ_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 | /**************************************************************************************/ |
| 130 | int pj_has_inverse(PJ *P) { |
no test coverage detected