[Proj] Transverse Mercator algorithm

Charles Karney ckarney at sarnoff.com
Fri Sep 5 14:09:26 EDT 2008


Gerald I. Evenden wrote:
> 1. Of the etmerc, ktmerc and ftmerc extended range versions of TM,
> etmerc appears to be the winner in precision as one approaches 90,0.
> When I figure out how to get maxima to generate a grid of numbers I
> will try to make a contour plot of precision comparisons.

Maxima uses algol-like control statements.  So try

writefile("output.txt")$

for ilat:0 step 1 thru 900 do
  for ilon:0 step 1 thru 900 do
    ( lat:bfloat(ilat/10),
      lon:bfloat(ilon/10),
      res:tm(lat,lon),
      print(float(lat),float(lon),float(res[1]),float(res[2])) )$

closefile()$

Warning: print(-1); yields "- 1", so you might need to run output.txt
thru a sed script to eliminate the space before reading the data into
another program.

-- 
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