Boost logo

Geometry :

Subject: [ggl] distance point to segment on sphere/ellipsoid
From: Barend Gehrels (Barend.Gehrels)
Date: 2010-03-17 08:32:49


Hi,

Welcome to the list.

tulinski wrote:
> Hello,
>
> I've got following results for distance (point to segment) computation after
> run example:
> https://svn.boost.org/svn/boost/sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.cpp
>
> The Hague - line Amsterdam,Rotterdam
> in RD: 18.8992
> in LL: 3.66211e-06
>
> Rotterdam - line Amsterdam,the Hague
> in RD: 20.6565
> in LL: 3.41797e-06
>
> Is it sth wrong with distance(point_ll_deg, segment_ll_deg) invocation?
>
>
Yes, surprising indeed. It apparently currently runs on a unit sphere,
so you have to multiply with the earth radius. I fixed the sample, but
it will be refactored later on. Note that the extensions currently do
not have core attention because of incorporation in Boost. However, I
must have broken something and will repair it in a few weeks.

Thanks for the report.

Regards, Barend

-- 
-------------------------------------
Barend Gehrels
-------------------------------------
http://www.erplex.com
http://trac.osgeo.org/ggl
http://www.geodan.nl
-------------------------------------
Geodan
President Kennedylaan 1
1079 MB Amsterdam
The Netherlands
-------------------------------------
Tel: +31 (0)20 5711 335
Mob: +31 (0)6 175 447 62
Fax: +31 (0)20 5711 333
-------------------------------------
E-mail: barend.gehrels_at_[hidden]
Kvk-nummer: 33 207089
Disclaimer: www.geodan.nl/disclaimer
-------------------------------------

Geometry list run by mateusz at loskot.net