$include_dir="/home/hyper-archives/geometry/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [geometry] Andoyer geographic distance
From: Barend Gehrels (barend_at_[hidden])
Date: 2014-11-12 04:46:55
Hi,
Adam Wulkiewicz wrote On 12-11-2014 0:49:
> Hi,
>
> 2014-11-11 1:53 GMT+01:00 Branimir Betov <bbetov_at_[hidden] 
> <mailto:bbetov_at_[hidden]>>:
>
>     Hi,
>
>     I am trying to work with boost 1.57 and also I've got the
>     geometry.extensions.gis from the develop branch. I am using
>     geographic cs. Looking at
>     extensions\gis\geographic\strategies\andoyer.hpp I think there is
>     a problem with one of the constructors:
>
>         explicit inline andoyer(RadiusType f)
>             : m_ellipsoid(f)
>         {}
>
>     I think should be:
>
>         explicit inline andoyer(RadiusType f)
>             : m_ellipsoid(f*, f*)
>         {}
>
>     (note the second radius passed to m_ellipsoid). Otherwise it
>     chooses the incorrect constructor for the ellipsoid and distances
>     are incorrect.
>
>
> I'm not entirely sure what's the purpose of this ctor and one-argument 
> ctor of ellipsoid. I'd say that the intention was to create a "unit" 
> ellipsoid with radius=1 and flattening f, but there is an error in the 
> ellipsoid ctor (it doesn't set B, only A and F). There is a reference 
> to a unit sphere (not ellipsoid) in the comment:
>
> // Unit sphere
> ellipsoid(T const& f)
> : m_a(1.0)
> , m_f(f)
> {}
>
>
Yes, I think this should go. It is (most probably) never used.
> https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/extensions/gis/geographic/detail/ellipsoid.hpp
>
> I plan to clean this code and move from extensions in the near future. 
> I think that this ctor could just dissapear. In the meanwhile I may 
> just fix it by setting B properly.
Agreed, that ctor should disappear. I think it has been used (by me) to 
compare between Haversine and this, and ended up in the repository.
Please remove it, or I can do it.
>     Sorry for posting it in the groups - I am not sure what the proper
>     way to submit a patch is.
>
>
> This group is a right place for such discussion :)
>
> A patch could be sent to this group or proposed directly on GitHub. I 
> personally prefer the latter. Here is a tutorial: 
> https://github.com/boostorg/geometry/wiki/Contribution-Tutorial
Thanks for reporting this.
Regards, Barend