Boost logo

Geometry :

Subject: Re: [geometry] Support for geographic coordinate system
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-11-23 07:54:08


Hi,

Barend Gehrels wrote:
> Adam Wulkiewicz wrote On 7-11-2014 0:00:
>> Barend Gehrels wrote:
>>> Adam Wulkiewicz wrote On 6-11-2014 17:06:
<snip>
>>>>
>>>>>
>>>>> Basically, to support this CS we need a distance strategy and side
>>>>> strategy. They're already implemented (more or less) though in the
>>>>> extensions so not officially released yet. To release them we need
>>>>> to think about the interface first. The geographical strategies
>>>>> should have an interface similar to the one used in spherical
>>>>> strategies.
>>>>>
>>>>> GEOGRAPHICAL:
>>>>>
>>>>> - a spherical side strategy is just used by default which I guess
>>>>> should be changed. I think the most precise would be a strategy
>>>>> finding the side using the geographic courses found using the
>>>>> inverse Vincenty's formula but this requires some testing
>>>>
>>>> As far as I know, the spherical side strategy works for the
>>>> geographic Earth too, please indicate if that is not the case.
>>>>
>>>> See also
>>>> http://barendgehrels.blogspot.nl/2011/06/spherical-side-formula.html
>>>>
>>>> But I might be wrong, it is good to research this.
>>>
>>> I feel that Vincenty's formula should give different results in some
>>> edge cases because the shape of geodesic on ellipsoid is different
>>> than on a sphere but I must perform some tests to be sure.
>
> I'm curious about this.

I've made some quick test where I compared the result of spherical side
formula and a side found by comparison of azimuths calculated using
Vincenty's formula. The method comparing azimuths is very simple and
probably not good enough to be released nevertheless the error is too
small to be seen in this case. The difference between spherical and
geographical geodesic seems to be a lot greater.

It's also possible that I made something wrong. In that case don't
hesitate to point it out :)

Here is the code and the results:
https://github.com/awulkiew/test-geoside

Regards,
Adam


Geometry list run by mateusz at loskot.net