| 858 | // --------------------------------------------------------------------------- |
| 859 | |
| 860 | static PJ_LPZ pj_gridshift_reverse_3d(PJ_XYZ xyz, PJ *P) { |
| 861 | auto Q = static_cast<gridshiftData *>(P->opaque); |
| 862 | |
| 863 | // Must be done before using m_offsetX ! |
| 864 | if (!Q->loadGridsIfNeeded(P)) { |
| 865 | return proj_coord_error().lpz; |
| 866 | } |
| 867 | |
| 868 | xyz.x -= Q->m_offsetX; |
| 869 | xyz.y -= Q->m_offsetY; |
| 870 | |
| 871 | PJ_XYZ xyz_out = Q->apply(P, PJ_INV, xyz); |
| 872 | PJ_LPZ lpz; |
| 873 | lpz.lam = xyz_out.x; |
| 874 | lpz.phi = xyz_out.y; |
| 875 | lpz.z = xyz_out.z; |
| 876 | return lpz; |
| 877 | } |
| 878 | |
| 879 | // --------------------------------------------------------------------------- |
| 880 |
nothing calls this directly
no test coverage detected