Python trig precision problem
robert.kern at gmail.com
Fri May 19 06:21:42 CEST 2006
Cary West wrote:
> Hello all, having a small problem with a trig routine using python math
> module. This code is designed to convert geodetic coordinates to lambert
> conformal conic coordinates. It implements the formulas found at
> http://mathworld.wolfram.com/LambertConformalConicProjection.html . The
> problem is that, at least on my machine, the precision is off to the tune of
> around 1 km, which is unacceptable. (using the calculator found at
> http://www.deh.gov.au/erin/tools/geo2lam-gda.html ) Anyone have any ideas?
> here is the offending code.
If you want to do map projections, I highly recommend using PyProj instead of
implementing the calculations yourself. Geodesy is nontrivial, and MathWorld
doesn't tell you half the details you need to take care of.
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list