id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13078,boost::geometry::intersection between a polygon and a box produces incorrect results,David R ,Barend Gehrels,"I am intersecting a polygon with a box and with a polygon of the same points as the box. The result from box intersection is incorrect - it is a large as the original polygon. Here is the code: {{{ #include ` #include #include namespace bg = boost::geometry; namespace bgm = bg::model; typedef double base_type; typedef bgm::d2::point_xy point_type; typedef bgm::polygon polygon_type; typedef bgm::multi_polygon multipolygon_type; int main() { std::vector points { {7.99922500000000127329e+02, 1.04990090625000011642e+04}, {7.99922500000000013642e+02, 9.99905624999999963620e+03}, {3.99961250000000006821e+02, 9.99905624999999963620e+03}, {3.99961250000000006821e+02, 1.04990090625000011642e+04}, {7.99922500000000127329e+02, 1.04990090625000011642e+04}, }; polygon_type poly; bg::assign_points(poly, points); bgm::box box( {5.99941874999999981810e+02, 1.02490326562500013097e+04}, {7.99922500000000013642e+02, 1.04990090625000011642e+04} ); std::vector box_points { {5.99941874999999981810e+02, 1.02490326562500013097e+04}, {5.99941874999999981810e+02, 1.04990090625000011642e+04}, {7.99922500000000013642e+02, 1.04990090625000011642e+04}, {7.99922500000000013642e+02, 1.02490326562500013097e+04}, {5.99941874999999981810e+02, 1.02490326562500013097e+04}, }; polygon_type box2; bg::assign_points(box2, box_points); multipolygon_type out; bg::intersection(poly, box, out); std::cout << bg::area(out) << "" "" << bg::wkt(out) << std::endl; multipolygon_type out2; bg::intersection(poly, box2, out2); std::cout << bg::area(out2) << "" "" << bg::wkt(out2) << std::endl; return 0; } }}} And this is the output: {{{ 199962 MULTIPOLYGON(((599.942 10499,799.923 10499,799.923 9999.06,399.961 9999.06,399.961 10499,599.942 10499))) 49990.4 MULTIPOLYGON(((799.923 10249,599.942 10249,599.942 10499,799.923 10499,799.923 10249))) }}} Is this expected?",Bugs,new,To Be Determined,geometry,Boost 1.59.0,Problem,,,