[Proj] Transverse Mercator algorithm

Charles Karney ckarney at sarnoff.com
Thu Sep 4 12:58:12 PDT 2008


Charles Karney wrote:
> It'll take a day or so to make my macsyma code for the exact transverse
> Mercator transformation presentable.

OK, I've posted the maxima code for the arbitrary precision transversion
Mercator projection.  Go to

    http://charles.karney.info/geographic/

and download tm.mac and ellint.mac.  There's some meager documentation
in tm.mac.

Start maxima and enter

    load("tm.mac")$
    xya:tm1(0b0,90b0)$
    float(xya);
    lla:ll1(xya[1],xya[2])$
    float(lla);

This converts the point 0N 90E to transverse Mercator (for WGS84) and
back to latitude and longitude.

float(xya) gives

    [2.595359284541359E+7, 9997964.943020998, 90.0, 18.40462279198669]

which is [easting(m), northing(m), convergence(deg), scale].

float(lla) gives [- 1.600614476517369E-82, 90.0] which approximates the
starting point.

The precision is 120 digits; so you should be typically getting results
which are good to at least half that many digits.

-- 
Charles Karney <ckarney at sarnoff.com>
Sarnoff Corporation, Princeton, NJ 08543-5300

URL: http://charles.karney.info
Tel: +1 609 734 2312
Fax: +1 609 734 2662



More information about the Proj mailing list