[PROJ] Geodetic to Authalic latitude conversions
Jérôme St-Louis
jerome at ecere.com
Wed Sep 11 13:21:29 PDT 2024
So it seems like we already have an implementation of Horner and
Clenshaw in:
https://github.com/OSGeo/PROJ/blob/master/src/mlfn.cpp
called /polyval()/ and /clenshaw()/ just like in GeographicLib (
polyval()
<https://github.com/geographiclib/geographiclib/blob/main/include/GeographicLib/Math.hpp#L280>
, Clenshaw()
<https://github.com/geographiclib/geographiclib/blob/main/src/AuxLatitude.cpp#L1319>).
It seems like Charles wrote or at least updated that :)
That is using the Cµφ (C[mu phi]) (A5) and Cφµ (C[phi mu]) (A6) from
page 12 of the paper, where µ is called the "rectifying latitude".
I imagine that this is directly related to the "meridional distance" ?
Perhaps we could re-organize this a bit to share this /polyval()/ and
/clenshaw()/ (they are currently static functions local to this
/mlfn.cpp/) for use in /auth.cpp/ ?
Thanks!
Kind regards,
-Jerome
On 9/11/24 3:33 PM, Jérôme St-Louis wrote:
>
> Thanks a lot for the input Charles and Thomas,
>
> I am not familiar with either Horner
> <https://en.wikipedia.org/wiki/Horner%27s_method> or Clenshaw
> <https://en.wikipedia.org/wiki/Clenshaw_algorithm>, but I do see the
> mentions now on /Section 6 - Evaluating the series/ pages 6 and 7 of
> the papers.
> I implemented the simpler basic approach from section 3 / page 3,
> which also happened to more easily correspond to the existing PROJ
> implementation.
>
> I can definitely try to understand all this, with the help of this
> Rust Geodesy code and the GeographicLib code, and have a go at
> updating my proposed implementation for improved accuracy and performance.
>
> Kind regards,
>
> -Jerome
>
> On 9/11/24 12:18 PM, Thomas Knudsen wrote:
>> I totally agree with Charles regarding using Horner for polynomial
>> evaluation and Clenshaw for the trig series - for accuracy and speed.
>>
>> I implemented all the material from Charles' preprint
>> https://arxiv.org/pdf/2212.05818 for Rust Geodesy, when the preprint
>> appeared about 1½ years ago.
>>
>> And although (being an experiment) my handling of the raw coefficients
>> is rather clumsy, at least it gave me a reason to revise my PROJ horner
>> and clenshaw implementations (which in turn were based on material from
>> Poder & Engsager: "Some Conformal Mappings...").
>>
>> So Jérôme, perhaps take a look at the functions "taylor" and "fourier"
>> over athttps://github.com/busstoptaktik/geodesy/blob/main/src/math/series.rs
>>
>> While written in Rust, translating to C++ should be rather trivial,
>> and they may be easier to follow than my decade-old versions already
>> in the PROJ code base.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20240911/e830c20c/attachment.htm>
More information about the PROJ
mailing list