From 817741be6a1f8f983d1cd1399a8c2ede01388dd5 Mon Sep 17 00:00:00 2001 From: tatiana-kondakova Date: Wed, 20 Sep 2017 11:21:13 +0300 Subject: [PATCH] Fix onesegment routes for case start segment is reverse of finish segment --- routing/index_graph_starter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routing/index_graph_starter.cpp b/routing/index_graph_starter.cpp index d1eed313c7..c1eff6831f 100644 --- a/routing/index_graph_starter.cpp +++ b/routing/index_graph_starter.cpp @@ -330,7 +330,12 @@ void IndexGraphStarter::AddEnding(FakeEnding const & thisEnding, FakeEnding cons map otherSegments; for (auto const & p : otherEnding.m_projections) + { otherSegments[p.m_segment] = p.m_junction; + // We use |otherEnding| to generate proper fake edges in case both endings have projections + // to the same segment. Direction of p.m_segment does not matter. + otherSegments[GetReverseSegment(p.m_segment)] = p.m_junction; + } // Add pure fake vertex auto const fakeSegment = GetFakeSegmentAndIncr(fakeNumerationStart);