Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::geometry::index::rtree with CoordinateSystem
From: Ola Martin Lykkja (Ola.Lykkja_at_[hidden])
Date: 2014-03-08 15:53:54


>> Hi,
>>
>> I am trying to build a rtree index with a collection of waypoint
>> (about 30.000) each represented by longitude and latitude. When I use
>> Cartesian coordinates rtree.query works as expected. However the
>> results are slightly wrong because of my use of longitude,latitude in
>> the cartesian domain.
>>
>> I then tried to refine the datatypes to use spherical_equatorial and
>> geographic CoordinateSystem. Now I encounter two problems:
>> a)With geographic, it does not compile.
>> b)With spherical_equatorial query(nearest) gives clearly wrong results.
>>
>> Do you have any clues on what I am doing wrong?
>
>Everything you're doing is ok.
>
>The support for coordinate systems other than cartesian is limited for now. As you noticed the nearest query gives >wrong results. Also the internal structure of the rtree may be not-optimal. At least the nearest query for spherical >CS should be fixed in upcoming Boost 1.56. Do you need some quick workaround?
>
>As for geographic CS, it fails to compile because the default distance strategy isn't defined for this CS. It >probable that distance() is just not implemented yet for geographic CS but I must confirm it.
>
>Could you please create tickets for those issues?
>
>Regards,
>Adam

First: I am pretty impressed with the index::rtree template. It is *VERY* useful in my current project!

Thanks for your reply! For my application, I am ok, for the moment, with the relatively small errors that using the
cartesian domain gives me. I have created two tickets (9758 and 9759)

What is the difference between spherical_equatorial and geographic and spherical? The documentation is rather unclear.

Kind regards,
Ola Martin


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net