Boost C++ Libraries: Ticket #13098: geometry::touches return wrong result on two polygons https://svn.boost.org/trac10/ticket/13098 <p> touches should returns true: </p> <pre class="wiki">#include &lt;boost/geometry/geometries/point_xy.hpp&gt; #include &lt;boost/geometry/geometries/polygon.hpp&gt; #include &lt;boost/geometry/algorithms/touches.hpp&gt; #include &lt;boost/tuple/tuple.hpp&gt; #include &lt;boost/geometry.hpp&gt; #include &lt;boost/geometry/geometries/polygon.hpp&gt; #include &lt;boost/geometry/geometries/adapted/boost_tuple.hpp&gt; typedef boost::geometry::model::d2::point_xy&lt;float&gt; P; boost::geometry::model::polygon&lt;P, false, false&gt; 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); </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13098 Trac 1.4.3 anonymous Thu, 12 Oct 2017 11:01:20 GMT <link>https://svn.boost.org/trac10/ticket/13098#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13098#comment:1</guid> <description> <p> Again with another test case </p> <pre class="wiki">typedef boost::geometry::model::d2::point_xy&lt;float&gt; P; boost::geometry::model::polygon&lt;P, false, false&gt; polygon1, polygon2; boost::geometry::append(polygon1, boost::make_tuple(-4.483882904052734375,-4.51576709747314453125)); boost::geometry::append(polygon1, boost::make_tuple(-4.483882904052734375,-0.747307300567626953125)); boost::geometry::append(polygon1, boost::make_tuple(-8.14855480194091796875,-0.747307300567626953125)); boost::geometry::append(polygon1, boost::make_tuple(-8.14855480194091796875,-4.51576709747314453125)); boost::geometry::append(polygon2, boost::make_tuple(-4.483882904052734375,-4.51576709747314453125)); boost::geometry::append(polygon2, boost::make_tuple(-8.14855480194091796875,-4.51576709747314453125)); boost::geometry::append(polygon2, boost::make_tuple(-8.14855480194091796875,-0.747307300567626953125)); boost::geometry::append(polygon2, boost::make_tuple(-4.483882904052734375,-0.747307300567626953125)); boost::geometry::append(polygon2, boost::make_tuple(-3.029389858245849609375,-0.74730741977691650390625)); boost::geometry::append(polygon2, boost::make_tuple(-14.33083057403564453125,0.830356121063232421875)); boost::geometry::append(polygon2, boost::make_tuple(-14.33083057403564453125,-5.412969112396240234375)); assert(boost::geometry::touches(polygon1, polygon2) == true); </pre> </description> <category>Ticket</category> </item> </channel> </rss>