Hi, I try boost::geometry::intersects algorithm(1 arg version) in Boost 1.47.0. Follow program result is "false". but, I hope result is "true". Is this Boost.Geometry bug? #include <iostream> #include <boost/assign/list_of.hpp> #include <boost/geometry/geometry.hpp> namespace bg = boost::geometry; int main() { typedef bg::model::d2::point_xy<double> point; const bg::model::linestring<point> line = boost::assign::list_of<point> // (0, 0) // result become "true" when comment-in (0, 4) (4, 4) (2, 2) (2, 5) ; const bool result = bg::intersects(line); std::cout << std::boolalpha << result << std::endl; } Regards,
======================== Akira Takahashi mailto:faithandbrave@gmail.com blog: http://d.hatena.ne.jp/faith_and_brave/
Hi Akira,
Hi,
I try boost::geometry::intersects algorithm(1 arg version) in Boost 1.47.0. Follow program result is "false". but, I hope result is "true".
It certainly should return true.
Is this Boost.Geometry bug?
Will look at this next weekend. Thanks for the report, Barend
Hi Akira, On 27-7-2011 3:17, Akira Takahashi wrote:
Hi,
I try boost::geometry::intersects algorithm(1 arg version) in Boost 1.47.0. Follow program result is "false". but, I hope result is "true". Is this Boost.Geometry bug?
It is fixed (in Trunk), thanks for the report. What was happening is that it detected that first/last segment intersected, which is possible for a linestring (but skipped for a closed ring). I added a unit test for this case. Regards, Barend
Hi Barend
It is fixed (in Trunk), thanks for the report.
I confirmed fix. Thanks!
======================== Akira Takahashi mailto:faithandbrave@gmail.com blog: http://d.hatena.ne.jp/faith_and_brave/
participants (2)
-
Akira Takahashi
-
Barend Gehrels