[PROJ] Possible bug in oblique cylindrical equal-area projection code

Mircea Neacsu mircea at neacsu.net
Tue Mar 14 11:18:52 PDT 2023


Hello,



I think I may have found a small error in the above mentioned projection (file ocea.cpp). The error can be directly traced to Snyder and the numerical example he gives for the spherical form of this projection.



In his numerical example (page 279, formula for x) Synder has the following derivations:

0.98X arctan [-0.6223338/(-0.9720102)l

= 0.98X(0.5694937 + rr), adding .rr since denominator is negative.



In ocea.cpp (line 29) this translates into the following code:

if (t < 0.)

        xy.x += M_PI;



I believe that Synder should have subtracted M_PI as the numerator of the atan fraction is negative (see Snyder page ix discussion about ATAN2 function) and consequently ocea projection should also use atan2.



I have to admit I'm writing this with a certain trepidation as reporting an error in Snyder is almost like finding faults in the Bible, but I'd like to have this clarified.



The error is probably insignificant and I ran into it only because I'm working on an online version of the Snyder book. You can check it at https://neacsu.net/docs/geodesy/snyder/ Currently I'm transcribing the numerical examples to JS and MathJax and that's how I ran into this issue.



Thank you for looking into it.

-- 



Mircea Neacsu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20230314/6ce49b52/attachment.htm>


More information about the PROJ mailing list