---------- Forwarded message ----------
From: Barend Gehrels <barend@xs4all.nl>
To: boost-users@lists.boost.org
Cc:
Date: Sun, 04 Mar 2012 18:01:52 +0100
Subject: Re: [Boost-users] [Geometry] Calculating distances on the earth
Hi Sean,
On 4-3-2012 17:14, Sean Farrow wrote:Hi all:
I need to calculate distances on the earth. Ideally I’d like to use the haversine formula.
There is an example in the docs at:
http://www.boost.org/doc/libs/1_49_0/libs/geometry/doc/html/geometry/quickstart.html
under the non-Cartesian heading.
Will this do what I need, or do I need the Geographical coordinate system, (if yes where is this available and what features does this supply?)
This will do what you ask for. So it will calculate distances on the Earth using the Haversine formula.
However, it considers the Earth as a perfect sphere, which it is not. So distances are rough approximations.
If you need more precise results indeed you will need the Geographic coordinate system, and the distances then use Andoyer which is much more precise.
That is not included in the current Release. So if you need it you have to download the Trunk of Boost, and it is there available as an extension.
See the examples here:
https://svn.boost.org/svn/boost/trunk/libs/geometry/example_extensions/gis/latlong/
Regards, Barend
---------- Forwarded message ----------
From: Sean Farrow <sean.farrow@seanfarrow.co.uk>
To: "boost-users@lists.boost.org" <boost-users@lists.boost.org>
Cc:
Date: Sun, 4 Mar 2012 17:13:21 +0000
Subject: Re: [Boost-users] [Geometry] Calculating distances on the earthHi:
Ok, thanks, What (roughly) is the difference in precision? I’m using this to determine the distance between two buildings.
Cheers
Sean.
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Barend Gehrels
Sent: 04 March 2012 17:02
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] [Geometry] Calculating distances on the earth
Hi Sean,
On 4-3-2012 17:14, Sean Farrow wrote:Hi all:
I need to calculate distances on the earth. Ideally I’d like to use the haversine formula.
There is an example in the docs at:
http://www.boost.org/doc/libs/1_49_0/libs/geometry/doc/html/geometry/quickstart.html
under the non-Cartesian heading.
Will this do what I need, or do I need the Geographical coordinate system, (if yes where is this available and what features does this supply?)
This will do what you ask for. So it will calculate distances on the Earth using the Haversine formula.
However, it considers the Earth as a perfect sphere, which it is not. So distances are rough approximations.
If you need more precise results indeed you will need the Geographic coordinate system, and the distances then use Andoyer which is much more precise.
That is not included in the current Release. So if you need it you have to download the Trunk of Boost, and it is there available as an extension.
See the examples here:
https://svn.boost.org/svn/boost/trunk/libs/geometry/example_extensions/gis/latlong/
Regards, Barend
---------- Forwarded message ----------
From: Barend Gehrels <barend@xs4all.nl>
To: boost-users@lists.boost.org
Cc:
Date: Sun, 04 Mar 2012 18:36:11 +0100
Subject: Re: [Boost-users] [Geometry] Calculating distances on the earth
Hi Sean,
On 4-3-2012 18:13, Sean Farrow wrote:Hi:
Ok, thanks, What (roughly) is the difference in precision? I’m using this to determine the distance between two buildings.
The sampes give an idea, but that is between cities (miles away). Between buildings the difference will be less, but I've not tested it. So the best is to test that yourself (and the results are interesting for the list ;-) )
Regards, Barend
---------- Forwarded message ----------
From: Sean Farrow <sean.farrow@seanfarrow.co.uk>
To: "boost-users@lists.boost.org" <boost-users@lists.boost.org>
Cc:
Date: Sun, 4 Mar 2012 17:49:04 +0000
Subject: Re: [Boost-users] [Geometry] Calculating distances on the earthHi:
I’ll test this and get back to the list. Do we have any idea as to whether/when the extension(s) will become part of the official distribution?
Cheers
Sean.
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Barend Gehrels
Sent: 04 March 2012 17:36
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] [Geometry] Calculating distances on the earth
Hi Sean,
On 4-3-2012 18:13, Sean Farrow wrote:Hi:
Ok, thanks, What (roughly) is the difference in precision? I’m using this to determine the distance between two buildings.
The sampes give an idea, but that is between cities (miles away). Between buildings the difference will be less, but I've not tested it. So the best is to test that yourself (and the results are interesting for the list ;-) )
Regards, Barend