From 2ac11443fa206dfda7102a8208e8ea5bb161c3ac Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 23 Jan 2015 17:10:44 +0100 Subject: [PATCH] [relate] Fix relate(MLs,A) - reset state in handler per Ls. In turns handling code reset exit_watcher and other state variables when new linestring is detected and previous one was handled. --- .../geometry/algorithms/detail/relate/linear_areal.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp index 5bc11453a..860119093 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp @@ -787,6 +787,15 @@ struct linear_areal } } + // If post-last-ip apply() was called this wouldn't be needed + if ( first_in_range ) + { + m_exit_watcher.reset(); + m_boundary_counter = 0; + m_first_from_unknown = false; + m_first_from_unknown_boundary_detected = false; + } + // i/u, c/u if ( op == overlay::operation_intersection || op == overlay::operation_continue ) // operation_boundary/operation_boundary_intersection