Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::geometry::index::rtree with different CoordinateSystem
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-03-07 20:13:23


Hi,

Ola Martin Lykkja wrote:
>
> Hi,
>
> I am trying to build a rtree index with a collection if 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



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