Opened 5 years ago
Last modified 5 years ago
#13098 new Bugs
geometry::touches return wrong result on two polygons
Reported by: | Owned by: | Barend Gehrels | |
---|---|---|---|
Milestone: | To Be Determined | Component: | geometry |
Version: | Boost 1.63.0 | Severity: | Problem |
Keywords: | polygon touches | Cc: |
Description
touches should returns true:
#include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <boost/geometry/algorithms/touches.hpp> #include <boost/tuple/tuple.hpp> #include <boost/geometry.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <boost/geometry/geometries/adapted/boost_tuple.hpp> typedef boost::geometry::model::d2::point_xy<float> P; boost::geometry::model::polygon<P, false, false> polygon1, polygon2; boost::geometry::append(polygon1, boost::make_tuple(32.0f, -0.00438580196f)); boost::geometry::append(polygon1, boost::make_tuple(32.0f, -4.0f)); boost::geometry::append(polygon1, boost::make_tuple(37.0f, -4.0f)); boost::geometry::append(polygon1, boost::make_tuple(37.0f, -0.00438580057f)); boost::geometry::append(polygon2, boost::make_tuple(32.0f, 20.0f)); boost::geometry::append(polygon2, boost::make_tuple(32.0f, -0.00438580196f)); boost::geometry::append(polygon2, boost::make_tuple(37.0f, -0.00438580057f)); boost::geometry::append(polygon2, boost::make_tuple(43.0f, -0.00438579917f)); boost::geometry::append(polygon2, boost::make_tuple(43.0f, 20.0f)); assert(boost::geometry::touches(polygon1, polygon2) == true);
Note:
See TracTickets
for help on using tickets.
Again with another test case