diff options
Diffstat (limited to 'boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp')
-rw-r--r-- | boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp b/boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp index 0d80d6f6c0..fccc0ffdb7 100644 --- a/boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp +++ b/boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp @@ -138,10 +138,17 @@ public: } operation_type const op = acceptable_operation<MultiPolygon>::value; + if ( base::check_turn(turn, method_touch_interior, op) + || base::check_turn(turn, method_touch, op)) + { + return true; + } - return base::check_turn(turn, method_touch_interior, op) - || base::check_turn(turn, method_touch, op) - ; + // Turn is acceptable only in case of a touch(interior) and both lines + // (polygons) do not cross + return (turn.method == method_touch + || turn.method == method_touch_interior) + && turn.touch_only; } }; |