check empty name string in motorway handler
This commit is contained in:
parent
d1e4ba373a
commit
701c5f853d
@ -379,11 +379,15 @@ Intersection MotorwayHandler::fromRamp(const EdgeID via_eid, Intersection inters
|
|||||||
//
|
//
|
||||||
// 7 1
|
// 7 1
|
||||||
// 0
|
// 0
|
||||||
|
const auto &first_intersection_name =
|
||||||
|
name_table.GetNameForID(first_intersection_data.name_id).to_string();
|
||||||
|
const auto &second_intersection_name =
|
||||||
|
name_table.GetNameForID(second_intersection_data.name_id).to_string();
|
||||||
if (intersection[1].entry_allowed)
|
if (intersection[1].entry_allowed)
|
||||||
{
|
{
|
||||||
if (isMotorwayClass(intersection[1].eid, node_based_graph) &&
|
if (isMotorwayClass(intersection[1].eid, node_based_graph) &&
|
||||||
second_intersection_data.name_id != EMPTY_NAMEID &&
|
!second_intersection_name.empty() && !first_intersection_name.empty() &&
|
||||||
first_intersection_data.name_id != EMPTY_NAMEID && first_second_same_name)
|
first_second_same_name)
|
||||||
{
|
{
|
||||||
// circular order indicates a merge to the left (0-3 onto 4
|
// circular order indicates a merge to the left (0-3 onto 4
|
||||||
if (angularDeviation(intersection[1].angle, STRAIGHT_ANGLE) <
|
if (angularDeviation(intersection[1].angle, STRAIGHT_ANGLE) <
|
||||||
@ -407,8 +411,8 @@ Intersection MotorwayHandler::fromRamp(const EdgeID via_eid, Intersection inters
|
|||||||
{
|
{
|
||||||
BOOST_ASSERT(intersection[2].entry_allowed);
|
BOOST_ASSERT(intersection[2].entry_allowed);
|
||||||
if (isMotorwayClass(intersection[2].eid, node_based_graph) &&
|
if (isMotorwayClass(intersection[2].eid, node_based_graph) &&
|
||||||
second_intersection_data.name_id != EMPTY_NAMEID &&
|
!second_intersection_name.empty() && !first_intersection_name.empty() &&
|
||||||
first_intersection_data.name_id != EMPTY_NAMEID && first_second_same_name)
|
first_second_same_name)
|
||||||
{
|
{
|
||||||
// circular order (5-0) onto 4
|
// circular order (5-0) onto 4
|
||||||
if (angularDeviation(intersection[2].angle, STRAIGHT_ANGLE) <
|
if (angularDeviation(intersection[2].angle, STRAIGHT_ANGLE) <
|
||||||
|
Loading…
Reference in New Issue
Block a user