From cf715a515687f0cd0ecb141d7198c56451155866 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 31 Aug 2014 21:59:23 -0400 Subject: [PATCH] Only use no_u_turn restriction for angles < 5 --- js/id/actions/restrict_turn.js | 8 ++++---- js/id/geo/intersection.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/id/actions/restrict_turn.js b/js/id/actions/restrict_turn.js index b5837eb57..a797a544a 100644 --- a/js/id/actions/restrict_turn.js +++ b/js/id/actions/restrict_turn.js @@ -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 diff --git a/js/id/geo/intersection.js b/js/id/geo/intersection.js index 8a4722810..3efe9670b 100644 --- a/js/id/geo/intersection.js +++ b/js/id/geo/intersection.js @@ -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';