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

Function pj_gridshift_reverse_3d

src/transformations/gridshift.cpp:860–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858// ---------------------------------------------------------------------------
859
860static 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

Callers

nothing calls this directly

Calls 3

proj_coord_errorFunction · 0.85
loadGridsIfNeededMethod · 0.80
applyMethod · 0.80

Tested by

no test coverage detected