[Boost-bugs] [Boost C++ Libraries] #13098: geometry::touches return wrong result on two polygons

Subject: [Boost-bugs] [Boost C++ Libraries] #13098: geometry::touches return wrong result on two polygons
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-06-26 16:28:51


#13098: geometry::touches return wrong result on two polygons
------------------------------+---------------------------
 Reporter: bruno.deligny@… | Owner: barendgehrels
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
  Version: Boost 1.63.0 | Severity: Problem
 Keywords: polygon touches |
------------------------------+---------------------------
 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);
 }}}

--
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13098>
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-06-26 16:35:47 UTC