[Boost-bugs] [Boost C++ Libraries] #9759: boost::geometry::index::rtree does not work properly spherical_equatorial

Subject: [Boost-bugs] [Boost C++ Libraries] #9759: boost::geometry::index::rtree does not work properly spherical_equatorial
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-08 20:40:52


#9759: boost::geometry::index::rtree does not work properly spherical_equatorial
------------------------------+---------------------------
 Reporter: ola.lykkja@… | Owner: barendgehrels
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 When spherical_equatorial coordinate system is used with index::rtree, the
 query(nearest) gives wrong results.

 My example insert 30.000 waypoint and query(nearest) mostly returns point
 east of the query point. When using cartesian, it works ok, except for the
 expected domain mismatch. Tested with boost 1.55.0 on Linux with g++ 4.4.3
 and g++ 4.6.3 (identical results). The attached map plots shows the
 results from the two tests (cartesian and spherical_equatorial). Full
 source code, inclduing all waypoint data available upon request.

 {{{
 typedef bg::model::point<double, 2, bg::cs::cartesian> geo_point_ok;
 typedef bg::model::point<double, 2,
 bg::cs::spherical_equatorial<bg::degree> > geo_point;
 typedef std::pair<geo_point, unsigned int> geo_vg_value;

 void test() {
       double lon=10.0, lat=60.0
       geo_point pt(lon, lat);
       rtree.insert(std::make_pair(pt, wp->id));

       std::vector<geo_vg_value> result;
       geo_point here(targetLat, targetLat);
       rtree.query(bgi::nearest(here, 20), std::back_inserter(result));
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9759>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC