Opened 4 years ago
Last modified 4 years ago
#13553 assigned Bugs
intersection gives wrong result
Reported by: | Owned by: | Barend Gehrels | |
---|---|---|---|
Milestone: | Boost 1.68.0 | Component: | geometry |
Version: | Boost 1.66.0 | Severity: | Problem |
Keywords: | Cc: | henrik@… |
Description
The following polygons result in a wrong intersection:
using point_type = boost::geometry::model::d2::point_xy<double>; typedef boost::geometry::model::ring<point_type, false, true> polygon;
polygon op1, op2;
boost::geometry::read_wkt("POLYGON((7.7058932076134967 -11.523889618379748,8.0348094747518424 0.63492733448631888,7.7720440433489850 0.63492733448631888, 7.7058932076134967 -11.523889618379748))", op1); boost::geometry::read_wkt("POLYGON((2.6206910206017642 -32.773696844382265, 5.5835888947200090 -24.273798818378602, 6.7109368565951772 -20.023839227004206, 7.4191426214038723 -15.773870150408516, 7.7058941612236938 -11.523876267001913, -3.1025600674348395 -11.523582486001384, -3.1025610210450365 -32.773541282571529, 2.6206910206017642 -32.773696844382265))", op2); std::vector<polygon> result; boost::geometry::intersection(op1, op2, result);
result is equal to op1, while op1 is mostly outside op2.
Change History (5)
comment:1 by , 4 years ago
Status: | new → assigned |
---|---|
Version: | Boost 1.66.0 → Boost Development Trunk |
comment:2 by , 4 years ago
Milestone: | To Be Determined → Boost 1.68.0 |
---|---|
Version: | Boost Development Trunk → Boost 1.66.0 |
comment:4 by , 4 years ago
btw. using the define BOOST_GEOMETRY_NO_ROBUSTNESS at least my problem with intersections and differences (posted as a comment in #13522)
comment:5 by , 4 years ago
Cc: | added |
---|
Thanks for the report. It will be fixed. I'm currently removing rescaling. I tested your case and added it to the test suite, and it passes already. This will hopefully be part of next Boost (1.68).
Besides that, most probably, it will work for you also if you define BOOST_GEOMETRY_NO_ROBUSTNESS, if that is a possible solution for you.