diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a355013e2a..2eafab343dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ - Exposes `use_threads_number=Number` parameter of `EngineConfig` to limit a number of threads in a TBB internal pool - Internals - MLD uses a unidirectional Dijkstra for 1-to-N and N-to-1 matrices + - Guidance + - don't suppress name announcements via sliproad handler + - allow a single hop intersection in sliproad handler # 5.12.0 - Guidance diff --git a/features/guidance/dedicated-turn-roads.feature b/features/guidance/dedicated-turn-roads.feature index 2eb0ade4077..99db632d3c6 100644 --- a/features/guidance/dedicated-turn-roads.feature +++ b/features/guidance/dedicated-turn-roads.feature @@ -1016,7 +1016,7 @@ Feature: Slipways and Dedicated Turn Lanes | nodes | highway | name | oneway | | sab | primary | sab | | | dbcef | primary | dbcef | | - | ae | primary_link | ae | yes | + | ae | primary_link | sab | yes | | cg | primary | cg | | diff --git a/features/guidance/roundabout.feature b/features/guidance/roundabout.feature index ed0eb7a83d2..e63b8bbdff0 100644 --- a/features/guidance/roundabout.feature +++ b/features/guidance/roundabout.feature @@ -829,16 +829,16 @@ Feature: Basic Roundabout """ And the ways - | nodes | highway | junction | oneway | # | - | abcda | tertiary | roundabout | | circle | - | ebds | tertiary | | | road | - | cm | tertiary | | | | - | ds | tertiary | | | road | - | rstur | tertiary | roundabout | | circle2 | - | ufghl | tertiary | | | road | - | tv | tertiary | | | | - | gi | tertiary | | yes | sliproad | - | jhik | tertiary | | | crossroad | + | nodes | highway | junction | oneway | # | + | abcda | tertiary | roundabout | | circle | + | ebds | tertiary | | | road | + | cm | tertiary | | | | + | ds | tertiary | | | road | + | rstur | tertiary | roundabout | | circle2 | + | ufghl | tertiary | | | road | + | tv | tertiary | | | | + | gi | tertiary_link | | yes | sliproad | + | jhik | tertiary | | | crossroad | When I route I should get diff --git a/src/extractor/guidance/sliproad_handler.cpp b/src/extractor/guidance/sliproad_handler.cpp index 5caa2a5083f..cf01624cd75 100644 --- a/src/extractor/guidance/sliproad_handler.cpp +++ b/src/extractor/guidance/sliproad_handler.cpp @@ -487,6 +487,24 @@ operator()(const NodeID /*nid*/, const EdgeID source_edge_id, Intersection inter continue; } + // Check if main road -> sliproad (non-link) -> candidate road requires two name + // announcements then don't suppress one announcement via sliproad handler + const auto main_road_name_id = node_based_graph.GetEdgeData(main_road.eid).name_id; + if (!sliproad_data.road_classification.IsLinkClass() && + sliproad_data.name_id != EMPTY_NAMEID && main_road_name_id != EMPTY_NAMEID && + candidate_data.name_id != EMPTY_NAMEID && + util::guidance::requiresNameAnnounced(main_road_name_id, + sliproad_data.name_id, + name_table, + street_name_suffix_table) && + util::guidance::requiresNameAnnounced(sliproad_data.name_id, + candidate_data.name_id, + name_table, + street_name_suffix_table)) + { + continue; + } + // If the Sliproad `bd` is a link, `bc` and `cd` must not be links. if (!isValidSliproadLink(sliproad, main_road, candidate_road)) {