id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13096,boost::geometry::intersection results depend on polypoints inputorder,kle@…,Barend Gehrels,"Hello, when calculating the intersection of the givin polygons, the result depends on the order of the inputpoints. {{{ #include #include #include int main(int argc, char* argv[]) { typedef boost::geometry::model::polygon> boost_polygon; boost_polygon RedPoly, GreenPoly, RedPolyReverted, GreenPolyReverted; boost::geometry::read_wkt(""POLYGON((864.11024748062812 524.94908797221251, 881.01048034069004 524.77831898197212, 877.68802698783907 501.82023487475703, 860.75736496460991 501.99865072086430, 864.11024748062812 524.94908797221251))"", RedPoly); boost::geometry::read_wkt(""POLYGON((864.62221751510151 524.94391475320754, 868.20628459909278 524.90769942280622, 864.93694798456659 502.47800172931238, 861.34657616182551 502.51580174027310, 864.62221751510151 524.94391475320754))"", GreenPoly); boost::geometry::read_wkt(""POLYGON((860.75736496460991 501.99865072086430, 877.68802698783907 501.82023487475703, 881.01048034069004 524.77831898197212, 864.11024748062812 524.94908797221251, 860.75736496460991 501.99865072086430))"", RedPolyReverted); boost::geometry::read_wkt(""POLYGON((861.34657616182551 502.51580174027310, 864.93694798456659 502.47800172931238, 868.20628459909278 524.90769942280622, 864.62221751510151 524.94391475320754, 861.34657616182551 502.51580174027310))"", GreenPolyReverted); boost::geometry::correct(RedPoly); boost::geometry::correct(GreenPoly); boost::geometry::correct(RedPolyReverted); // reverts order of points and is now equal it RedPoly boost::geometry::correct(GreenPolyReverted); // reverts order of points and is now equal it GreenPoly std::list output; boost::geometry::intersection(RedPoly, GreenPoly, output); // error: output is empty std::list outputReverted; boost::geometry::intersection(RedPolyReverted, GreenPolyReverted, outputReverted); // correct: outputReverted.front equals GreenPoly return 0; } }}} ",Bugs,new,To Be Determined,geometry,Boost 1.64.0,Problem,,intersection,