<div dir="ltr">Hey,<div>i'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'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("POLYGON((1012 1621, 1013 1621, 1013 1622, 1012 1622, 1012 1621))", testPol);</div><div> typedef bg::model::d2::point_xy<double, boost::geometry::cs::cartesian> point_t;</div><div> typedef bg::model::linestring<point_t> 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<point_t> res;</div><div> bg::intersection(testPol, ls, res);</div></div><div><br></div><div>thanks</div><div>Sergei</div></div>