MCPcopy Create free account
hub / github.com/Kitware/VTK / proj_geod

Function proj_geod

ThirdParty/libproj/vtklibproj/src/4D_api.cpp:119–133  ·  view source on GitHub ↗

Geodesic distance (in meter) + fwd and rev azimuth between two points on the ellipsoid */

Source from the content-addressed store, hash-verified

117
118/* Geodesic distance (in meter) + fwd and rev azimuth between two points on the ellipsoid */
119PJ_COORD proj_geod (const PJ *P, PJ_COORD a, PJ_COORD b) {
120 PJ_COORD c;
121 if( !P->geod ) {
122 return proj_coord_error();
123 }
124 /* Note: the geodesic code takes arguments in degrees */
125 geod_inverse (P->geod,
126 PJ_TODEG(a.lpz.phi), PJ_TODEG(a.lpz.lam),
127 PJ_TODEG(b.lpz.phi), PJ_TODEG(b.lpz.lam),
128 c.v, c.v+1, c.v+2
129 );
130
131 // cppcheck-suppress uninitvar
132 return c;
133}
134
135
136/* Geodesic distance (in meter) between two points with angular 2D coordinates */

Callers

nothing calls this directly

Calls 2

proj_coord_errorFunction · 0.85
geod_inverseFunction · 0.85

Tested by

no test coverage detected