[Proj] degree to radian conversions

Even Rouault even.rouault at spatialys.com
Thu Aug 13 15:58:36 EST 2015


Le jeudi 13 août 2015 22:46:03, Charles Karney a écrit :
> I just submitted a pull request for proj.4 to correct the values of the
> constants used in degree/radian conversions.  The important change was
> to use
> 
>    .0174532925199432958
> 
> instead of
> 
>    .0174532925199433
> 
> as the value of pi/180 used to convert degrees to radians in dmstor.c.
> The new value is substantial closer to the true value...
> 
>    cos(90 * .0174532925199432958) =  6.1e-17
>    cos(90 * .0174532925199433)    = -3.8e-16
> 
> Needless to say, some of the tests now fail.  Particularly because
> proj.4 used to round 90 deg to an illegal latitude (larger than pi/2).
> 
> However the changes for the healpix checks are inexplicably large.
> 
> It would be good if someone could figure out why the healpix results
> change so much.

Adding in CC the authors mentionned in PJ_healpix.c, if they're not subscribed 
to this mailing list, in case they have an idea.

And for everyone, the commit of the pull request : 
https://github.com/OSGeo/proj.4/commit/794052ed09f5c9e4ee49ece4af7f641098e29eb4

And test failures:
https://travis-ci.org/OSGeo/proj.4/jobs/75476366

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the Proj mailing list