[Proj] geodesic calculations on v5

Thomas Knudsen knudsen.thomas at gmail.com
Sat Feb 10 04:19:03 EST 2018


Idan,

For the part of your question relating to the API: There are two new API
calls:

double proj_lp_dist (const PJ *P, PJ_LP a, PJ_LP b)

and

double proj_lpz_dist (const PJ *P, PJ_LPZ a, PJ_LPZ b)

The first returns the geodesic distance between points aand b, the second
the length of the hypothenusis of a right angled triangle with base length
proj_lp_dist (a,b), and height a.z-b.z, i.e. "the distance between the
points if the Earth was flat".

The functions are intended for transformation accuracy assessment, and *do
not introduce* anything new: Basically, they are calls to Charles' code,
with some syntactic sugar, and discarding the two azimuths from the result,
just returning the distance.

But while writing this (and in the view of the material merged yesterday,
renaming the old style coordinate types by moving them to the PJ_ name
space), I notice that these call signatures are actually buggy: Along with
two additional distance functions, they are the only place where the old
style coordinates pop to the top of the new style API.

I will file an issue regarding this, and if the other developers agree you
will probably see these signatures in the final 5.0.0:

double proj_lp_dist (const PJ *P, PJ_COORD a, PJ_COORD b)

and

double proj_lpz_dist (const PJ *P, PJ_COORD a, PJ_COORD b)






2018-02-10 9:30 GMT+01:00 Idan Miara <idan at miara.com>:

> Thanks for the pointers!
>
> On 9 Feb 2018 10:57 am, "Charles Karney" <charles at karney.com> wrote:
>
>> The new write-up on the geodesic calculations is available at
>>
>>   http://proj4.org/geodesic.html
>>
>> This just gives a general discussion of the geodesic problem.
>> Detailed documentation of the API is at
>>
>>   https://geographiclib.sourceforge.io/1.49/C/geodesic_8h.html
>>
>> proj 5.0 introduces no changes to this API on in the performance
>> of the geodesic code.
>>
>>   --Charles
>>
>> On 02/09/2018 02:15 AM, Idan Miara wrote:
>>
>>> Hi,
>>>
>>> I read that there was a complete rewrite of the documentation section on
>>> geodesic calculations.
>>>
>>> Were all the changes in v5 regarding coordinate transformations?
>>> Or was there any change in API or in performance of geodesic
>>> calculations in v5?
>>>
>>> Regards,
>>> Idan
>>>
>>>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20180210/0d9ed168/attachment.htm 


More information about the Proj mailing list