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

Even Rouault even.rouault at spatialys.com
Wed Mar 15 16:21:43 PDT 2023


Mircea,

could you file an issue at https://github.com/OSGeo/PROJ/ about that ? 
It would help if you could provide evidence that a change is needed: 
like wrongly transformed coordinates (possibly with a screenshot of a 
reprojected map before and after your fix) or that the current forward 
formula doesn't roundtrip with the inverse formula before your fix, but 
does after, etc.

I see in 
https://github.com/OSGeo/PROJ/commit/5cad2f68f2a68c8c6854d0bfc62700299598dfa1 
that I already did a atan() -> atan2() change in another equation (9-8) 
of ocea, so maybe equation (10-4) also needs it.

Even

Le 14/03/2023 à 19:18, Mircea Neacsu a écrit :
> 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
>
>
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20230316/1e513545/attachment.htm>


More information about the PROJ mailing list