diff --git a/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp b/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp index 71c3a9bb1..c4b6ac7c5 100644 --- a/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp +++ b/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp @@ -285,7 +285,7 @@ struct sectionalize_part section_type section; bool mark_first_non_duplicated = true; - std::size_t last_non_duplicate_index = 0; + std::size_t last_non_duplicate_index = sections.size(); iterator_type it = boost::begin(range); diff --git a/test/algorithms/overlay/get_turns_linear_linear.cpp b/test/algorithms/overlay/get_turns_linear_linear.cpp index ebaff5128..63dae1734 100644 --- a/test/algorithms/overlay/get_turns_linear_linear.cpp +++ b/test/algorithms/overlay/get_turns_linear_linear.cpp @@ -22,14 +22,15 @@ //TEST //#include -//#include -//#include +#include +#include template void test_all() { typedef bg::model::point pt; typedef bg::model::linestring ls; + typedef bg::model::multi_linestring mls; test_geometry("LINESTRING(0 0,2 0)", "LINESTRING(0 0,2 0)", "tii", "txx"); test_geometry("LINESTRING(0 0,2 0)", "LINESTRING(2 0,0 0)", "tix", "txi"); @@ -120,6 +121,10 @@ void test_all() // to_svg("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)", "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)", "test33.svg"); // to_svg("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)", "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)", "test34.svg"); //} + + test_geometry("MULTILINESTRING((0 0,10 0,30 0))", + "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(2 0,2 0),(3 0,3 0,3 0))", + expected("mii")("ccc")("ccc")("txx")); } int test_main(int, char* [])