[Proj] Any access to geodetic[sic] functions ??

Gerald I. Evenden geraldi.evenden at gmail.com
Thu Nov 13 14:59:49 PST 2008


On Thursday 13 November 2008 1:18:27 pm Christopher Barker wrote:
> Frank Warmerdam wrote:
> > I'd like to encourage those interested to setup a page of pointers to
> > resources on geodesic distance calculations on the PROJ.4 Trac site.
>
> Done:
>
> http://trac.osgeo.org/proj/wiki/GeodesicCalculations
>
> Could those of you that actually know what you are talking about please
> take a look and correct and/or add to it?
>
> I also do think it would be nice to publish a C lib for this somewhere
> -- Gerald, are you willing to put your C code out there, and see if
> someone (maybe me) wants to work with it?

I will have to dig it out.  As I recall it was something that was preprocessed 
by f2c and then postedited by me into something a little more readable.

OK, found a recoded copies dated Feb., 2003.  I do not know if the NGS stuff 
has been updated since then.  The boiler plate on one of the files reads:

/* Translation of NGS FORTRAN code for determination of point at
** distance 's' and azimuth 'Az12' from point 'phi1','lam2'.  Good for
** any values that are less than antipodal distance.
**
**      INPUT
**	phi1, lam1 -- latitude and logitude of first point in radians.
**  Az12 -- azimuth to second point from first point in radians clockwise
**			from North.
**	s -- distance from first to second point normalized by major
**			elliptical axis (i.e. / a).
**	f -- elliptical flattening.
**
**		OUTPUT
**	phi2, lam2 -- latitude and longitude of second point.
**	Az21 -- azimuth from second point back to first point.
*/
#include <math.h>
#define PI 3.141592653589793238462643
#define EPS 5e-14
	void
for_geodesic(double phi1, double lam1, double Az12, double s, double f,
	double *phi2, double *lam2, double *Az21) {

The whole file consists of this one procedure and a main program that executes 
it with a simple test.

There is a similar file for the inverse case.

> > A link to such info from the FAQ would also likely be appropriate.
>
> Also done.
>
> -Chris



-- 
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist



More information about the Proj mailing list