Ticket #97 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Add extended tmerc implementation

Reported by: warmerdam Owned by: warmerdam
Priority: major Milestone: 4.8.0
Component: Core Version: unspecified
Keywords: etmerc Cc:

Description (last modified by warmerdam) (diff)

There have been frequent requests for a transverse mercator implemention that roundtrips well far from the central meridian. A number of implementations have been discussed on the proj mailing list but this is a suggested implementation.

Thomas Knudsen writes:

As said on the proj mailing list, I will now forward Geralds timing experiments to you. (incidentally, I now see that you were actually also recipient of Gerald's original message, but since it is now almost 3 years ago it probably makes sense to collect everything again).

In addition to Geralds original attachments for the timing experiments (temparc.tar.bz2 and cpuinfo), i attach Karsten's original code (utm.zip), Karsten's ICA paper on the subject (TheTransverse?... .pdf), and my slightly optimized version of Gerald's adaptation of Karsten's code. Unfortunately, I cannot find my copy of Gerald's original version without my (potentially premature) optimizations. Essentially, they consist of

  1. getting rid of a function call to fabs through the definition of the macro FABS
  2. getting rid of calls to sinh and cosh, at the cost of a few extra calls to exp (which gcc can optimize away to direct processor instructions)
  3. calling sincos rather than separate calls to sin and cos, when using gcc
  4. wondering whether asin really should be called "forgive" since it is the inverse of "sin"...

Attachments

proj_etmerc_optimized.c Download (7.9 KB) - added by warmerdam 2 years ago.
cpuinfo Download (1.2 KB) - added by warmerdam 2 years ago.

Change History

Changed 2 years ago by warmerdam

Changed 2 years ago by warmerdam

Changed 2 years ago by warmerdam

  • description modified (diff)

Changed 2 years ago by warmerdam

  • status changed from new to closed
  • resolution set to fixed

I have incorporated "etmerc" as a projection based on the supplied code. I have also added a small test to the test suite (testvarious). All in trunk (r1976). Unfortunately this revision also includes a libtool update by accident.

Note: See TracTickets for help on using tickets.