Opened 8 years ago
Last modified 7 years ago
#10983 assigned Bugs
box-box distance doesn't seem to work with spherical coordinate systems
Reported by: | Owned by: | mkaravel | |
---|---|---|---|
Milestone: | Boost 1.59.0 | Component: | geometry |
Version: | Boost 1.57.0 | Severity: | Problem |
Keywords: | distance box spherical | Cc: | mkaravel |
Description
The "geometry distance matrix" indicates that all geometry-to-geometry distances have been implemented in 1.57. But the box-to-box distance doesn't seem to work with spherical geometries, at least with gcc 4.4.7.
One of the errors seems to be a "not yet implemented" error, so perhaps it hasn't been done yet. It does have some tricky business that a cartesian box wouldn't have, but it's a straightforward exercise in trying different cases.
I'm certainly delighted with boost::geometry's functionality as is, but it would be great if this worked. And many apologies if the mistake is mine.
See example below for problem.
#include <boost/geometry/geometry.hpp> typedef boost::geometry::model::point<double,2,boost::geometry::cs::cartesian> cartesian_point; typedef boost::geometry::model::point<double,2,boost::geometry::cs::spherical_equatorial<boost::geometry::degree> > spherical_point; int main() { // Works... boost::geometry::model::box<cartesian_point> c_box1, c_box2; boost::geometry::distance(c_box1,c_box2); // Doesn't work! boost::geometry::model::box<spherical_point> s_box1, s_box2; boost::geometry::distance(s_box1,s_box2); return 0; }
Change History (2)
comment:1 by , 8 years ago
Component: | None → geometry |
---|---|
Keywords: | distance box spherical added |
Owner: | set to |
comment:2 by , 7 years ago
Cc: | added |
---|---|
Milestone: | To Be Determined → Boost 1.59.0 |
Owner: | changed from | to
Status: | new → assigned |
The box-box distance does not work yet on the spherical coordinate system. The matrix refers to all combinations of geometries in the Cartesian coordinate system. The way we report converage in the distance matrix should be changed to reflect the coordinate system(s) it refers to. The box-box distance should be available in boost 1.59.