id summary reporter owner description type status milestone component version severity resolution keywords cc 6958 boost::geometry::intersection on two polygons creates self-intersecting polygon anonymous Barend Gehrels "This program intersects two non-self-intersecting polygons and receives a self-intersecting polygon as output. The expected result was a polygon that does not intersect itself. I tested this on SVN revision 78784, and it failed with: A B terminate called after throwing an instance of 'boost::geometry::overlay_invalid_input_exception' what(): Boost.Geometry Overlay invalid input exception Aborted Thanks! Craig {{{ #include #include #include #include #include #include #include #include #include typedef boost::geometry::model::d2::point_xy pt; typedef boost::geometry::model::polygon polygon; typedef boost::geometry::model::multi_polygon multi_polygon; int main() { polygon green, blue; multi_polygon output; boost::geometry::read_wkt( ""POLYGON((0.63872330997599124913 0.25963790394761232516 ,"" "" 0.51901482278481125832 0.36860892060212790966 ,"" "" 0.24443514109589159489 0.62663296470418572426 ,"" "" 0.41175117865081167778 0.47178476291601745274 ,"" "" 0.63872330997599124913 0.25963790394761232516))"", green); boost::geometry::read_wkt( ""POLYGON((0.52364358028948876367 0.36823021165656988352 ,"" "" 0.7762673462275415659 0.13443113025277850237 ,"" "" 0.59446187055393329146 0.29992923303868185281 ,"" "" 0.52364358028948876367 0.36823021165656988352))"",blue); boost::geometry::correct(green); boost::geometry::correct(blue); boost::geometry::detail::overlay::has_self_intersections(green); boost::geometry::detail::overlay::has_self_intersections(blue); printf(""A\n""); boost::geometry::intersection(green,blue,output); printf(""B\n""); boost::geometry::detail::overlay::has_self_intersections(output); printf(""C\n""); return 0; } }}}" Bugs closed Boost 1.55.0 geometry Boost Development Trunk Problem fixed snubdodecahedron@…