make circular detection covered again
This commit is contained in:
parent
704cf314d4
commit
910ee0829f
@ -530,19 +530,16 @@ Feature: Merge Segregated Roads
|
|||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
i
|
i
|
||||||
/
|
b `
|
||||||
/
|
` ` p .
|
||||||
/
|
a ` g` ` \ f
|
||||||
b---- g .
|
|
||||||
/ p .
|
|
||||||
a / \ f
|
|
||||||
\ / o /
|
\ / o /
|
||||||
\ / \ /
|
\ / \ /
|
||||||
c n /
|
h - - c n /
|
||||||
/ \ \/
|
\ \/
|
||||||
/ k e
|
k e
|
||||||
/ \ /
|
\ /
|
||||||
h l /
|
l /
|
||||||
\ /
|
\ /
|
||||||
m . d
|
m . d
|
||||||
/
|
/
|
||||||
@ -561,7 +558,7 @@ Feature: Merge Segregated Roads
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| i,h | Kurfürstendamm,Hubertusallee,Hubertusallee | depart,turn straight,arrive |
|
| i,h | Kurfürstendamm,Rathenauplatz,Hubertusallee,Hubertusallee | depart,turn right,turn right,arrive |
|
||||||
|
|
||||||
# https://www.openstreetmap.org/#map=19/52.46339/13.40272
|
# https://www.openstreetmap.org/#map=19/52.46339/13.40272
|
||||||
Scenario: Do not merge links between segregated roads
|
Scenario: Do not merge links between segregated roads
|
||||||
|
@ -109,13 +109,8 @@ bool MergableRoadDetector::CanMergeRoad(const NodeID intersection_node,
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// finally check if two roads describe the direction
|
// finally check if two roads describe the direction
|
||||||
if (HaveSameDirection(intersection_node, lhs, rhs))
|
return HaveSameDirection(intersection_node, lhs, rhs) &&
|
||||||
{
|
!IsCircularShape(intersection_node, lhs, rhs);
|
||||||
// do not merge traffic circles and similar
|
|
||||||
return !IsCircularShape(intersection_node, lhs, rhs);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MergableRoadDetector::HaveIdenticalNames(const NameID lhs, const NameID rhs) const
|
bool MergableRoadDetector::HaveIdenticalNames(const NameID lhs, const NameID rhs) const
|
||||||
|
Loading…
Reference in New Issue
Block a user