<div dir="ltr">Hey,<div>i&#39;m trying to use bg::intersection to find the intersection between a line segment and a polygon.</div><div>in some cases it works, but in others it doesn&#39;t.</div><div><br></div><div>there should be an intersection between these two geometries but i get nothing in the result.</div><div>anyone knows of any issues regarding this type of intersections?</div><div><br></div><div>this is the test code i ran:</div><div><br></div><div><div>    bgPolygonType testPol;</div><div>    boost::geometry::read_wkt(&quot;POLYGON((1012 1621, 1013 1621, 1013 1622, 1012 1622, 1012 1621))&quot;, testPol);</div><div>    typedef bg::model::d2::point_xy&lt;double, boost::geometry::cs::cartesian&gt; point_t;</div><div>    typedef bg::model::linestring&lt;point_t&gt; linestring_t;</div><div><br></div><div>    linestring_t ls;</div><div>    bg::append(ls, point_t(1011.4, 1621.64));</div><div>    bg::append(ls, point_t(1013.6, 1623.68));</div><div><br></div><div>    std::vector&lt;point_t&gt; res;</div><div>    bg::intersection(testPol, ls, res);</div></div><div><br></div><div>thanks</div><div>Sergei</div></div>