Skip to content

Empty name_id checks need to be changed to empty name_id string checks #4642

@MoKob

Description

@MoKob

The guidance engine relies on the use of name_id == EMPTY_NAMEID in many places where we decide between announcing/not announcing a turn. These checks interact with requiresNameAnnounced, which assumes turning onto a road without name doesn't require an announcement.
The checks for EMPTY_NAMEID precede the call of requiresNameAnnounced to ensure that roads without names are treated correctly.

With the addition of more and more fields to the field referenced to by name_id, a name_id != EMPTY_NAMEID can be true, even though the road doesn't have a name or a ref.

We need to revisit all checks that compare for EMPTY_NAMEID and ensure that they are working as intended when destination:ref (for example) is present on a road without name or ref.

Places to check:

  • src/engine/guidance/collapse_scenario_detection.cpp
  • src/extractor/extraction_containers.cpp (most likely fine)
  • src/extractor/guidance/intersection_handler.cpp
  • src/extractor/guidance/mergable_road_detector.cpp
  • src/extractor/guidance/motorway_handler.cpp
  • src/extractor/guidance/roundabout_handler.cpp
  • src/extractor/guidance/sliproad_handler.cpp
  • src/extractor/guidance/turn_handler.cpp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions