Only use no_u_turn restriction for angles < 5

This commit is contained in:
Bryan Housel
2014-08-31 21:59:23 -04:00
parent e00a9cf067
commit cf715a5156
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -14,11 +14,11 @@
// If `restriction` is not provided, it is automatically determined by the
// angle of the turn:
//
// 0-23 degrees: no_u_turn
// 23-158 degrees: no_right_turn
// 0-5 degrees: no_u_turn
// 5-158 degrees: no_right_turn
// 158-202 degrees: no_straight_on
// 202-326 degrees: no_left_turn
// 336-360 degrees: no_u_turn
// 202-355 degrees: no_left_turn
// 355-360 degrees: no_u_turn
//
// If necessary, the `from` and `to` ways are split. In these cases, `from.node`
// and `to.node` are used to determine which portion of the split ways become
+2 -2
View File
@@ -127,13 +127,13 @@ iD.geo.inferRestriction = function(from, via, to, projection) {
while (angle < 0)
angle += 360;
if (angle < 23)
if (angle < 5)
return 'no_u_turn';
if (angle < 158)
return 'no_right_turn';
if (angle < 202)
return 'no_straight_on';
if (angle < 336)
if (angle < 355)
return 'no_left_turn';
return 'no_u_turn';