I'm currently trying to update our application from Boost 1.55.0 to 1.57.0 but I'm running into problems with bg::intersects (for a single geometry) returning true in 1.57 when in 1.55 it is false.
More specifically, we have a linestring<bg::model::d2::point_xy<double>> for which boost 1.55 says there are no self-intersections whilst 1.57 says there is 1 self-intersection.
The linestring is closed and, internally, the turn reported by detail::self_get_turn_points::get_turns is of type bg::method_touch and the turn point given is equal to the first and last point of the linestring (remember the linestring is closed). Thinking that it was perhaps ambiguous to call intersects with a closed linestring, I also tried the same co-ordinates in a ring but observed the same behaviour; intersects returns true due to a method_touch turn at the first/last point. I am seeing this error in only a very small number of our tests which currently makes me think it is a numerical stability type issue rather than a general problem.
Looking at the change history of intersects.hpp, the robustness policy was changed to no_rescale_policy in commit e1dfe2e. This seems to have caused my problem. If I revert this change then intersects, in 1.57.0, is reporting false again. Does anyone have information on why this change to no_rescale_policy was made?
I have a small test case which I can log as a ticket if that is the best approach. The example is too big to post inline here.
I am using Visual Studio 2013.
Some polygons generated with geometry::buffer are tagged as self intersecting by boost 1.57 but where OK with 1.55.
Moreover those self intersecting polygons are also tagged as is_simple() == true. From the OGC specification a self intersecting polygon cannot be simple.
I have attached a code sample in my post that reproduces this issue.