/
| 72 | |
| 73 | /**************************************************************************************/ |
| 74 | PJ_COORD pj_approx_2D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { |
| 75 | /*************************************************************************************** |
| 76 | Behave mostly as proj_trans, but attempt to use 2D interfaces only. |
| 77 | Used in gie.c, to enforce testing 2D code, and by PJ_pipeline.c to implement |
| 78 | chained calls starting out with a call to its 2D interface. |
| 79 | ***************************************************************************************/ |
| 80 | if (nullptr==P) |
| 81 | return coo; |
| 82 | if (P->inverted) |
| 83 | direction = static_cast<PJ_DIRECTION>(-direction); |
| 84 | switch (direction) { |
| 85 | case PJ_FWD: |
| 86 | coo.xy = pj_fwd (coo.lp, P); |
| 87 | return coo; |
| 88 | case PJ_INV: |
| 89 | coo.lp = pj_inv (coo.xy, P); |
| 90 | return coo; |
| 91 | case PJ_IDENT: |
| 92 | break; |
| 93 | } |
| 94 | return coo; |
| 95 | } |
| 96 | |
| 97 | |
| 98 | /**************************************************************************************/ |
no test coverage detected