From a5353c7179b8c49e9d84393291f362361a6ac54a Mon Sep 17 00:00:00 2001 From: Michael Krasnyk Date: Tue, 2 Jan 2018 10:54:46 +0100 Subject: [PATCH] Use consistent EBG node weights in duplicated via nodes --- CHANGELOG.md | 1 + src/extractor/edge_based_graph_factory.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 048bfd93b..208ab00f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Bugfixes: - FIXED #4754: U-Turn penalties are applied to straight turns. - FIXED #4756: Removed too restrictive road name check in the sliproad handler + - FIXED #4731: Use correct weights for edge-based graph duplicated via nodes. # 5.14.2 - Changes from 5.14.1: diff --git a/src/extractor/edge_based_graph_factory.cpp b/src/extractor/edge_based_graph_factory.cpp index ac038be4b..ba4c4a814 100644 --- a/src/extractor/edge_based_graph_factory.cpp +++ b/src/extractor/edge_based_graph_factory.cpp @@ -375,7 +375,9 @@ EdgeBasedGraphFactory::GenerateEdgeExpandedNodes(const WayRestrictionMap &way_re m_edge_based_node_container.nodes[edge_based_node_id].segregated = segregated_edges.count(eid) > 0; - m_edge_based_node_weights.push_back(m_edge_based_node_weights[eid]); + const auto ebn_weight = m_edge_based_node_weights[nbe_to_ebn_mapping[eid]]; + BOOST_ASSERT(ebn_weight == INVALID_EDGE_WEIGHT || ebn_weight == edge_data.weight); + m_edge_based_node_weights.push_back(ebn_weight); edge_based_node_id++; progress.PrintStatus(progress_counter++);