{"action":"opened","issue":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/2758","repository_url":"https://api.github.com/repos/Project-OSRM/osrm-backend","labels_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/2758/labels{/name}","comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/2758/comments","events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/2758/events","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/2758","id":170197459,"number":2758,"title":"Traffic Signal Penalty based on a Way's Direction","user":{"login":"daniel-j-h","id":527241,"avatar_url":"https://avatars.githubusercontent.com/u/527241?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-j-h","html_url":"https://github.com/daniel-j-h","followers_url":"https://api.github.com/users/daniel-j-h/followers","following_url":"https://api.github.com/users/daniel-j-h/following{/other_user}","gists_url":"https://api.github.com/users/daniel-j-h/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-j-h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-j-h/subscriptions","organizations_url":"https://api.github.com/users/daniel-j-h/orgs","repos_url":"https://api.github.com/users/daniel-j-h/repos","events_url":"https://api.github.com/users/daniel-j-h/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-j-h/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/labels/Discussion","name":"Discussion","color":"444444"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-09T15:31:46Z","updated_at":"2016-08-09T15:31:46Z","closed_at":null,"body":"Opening a ticket to clarify how we currently handle traffic signal penalties. The following questions came up during looking into how we could implement Stop Signs in https://github.com/Project-OSRM/osrm-backend/issues/2652.\r\n\r\nMy understanding so far:\r\n- In the profile we [mark ExtractionNodes as traffic light](https://github.com/Project-OSRM/osrm-backend/blob/464de785cb84898edc509a31bb0d6a8b1d13a878/profiles/car.lua#L217-L221)\r\n- In the EBGF we [penalize all turns over a traffic light node](https://github.com/Project-OSRM/osrm-backend/blob/464de785cb84898edc509a31bb0d6a8b1d13a878/src/extractor/edge_based_graph_factory.cpp#L421-L424)\r\n\r\nFrom what I can tell, this does not into account the direction the traffic light applies to.\r\n\r\nImagine a scenario where a single traffic signal (`x`) only applies to the way coming from the left:\r\n\r\n```\r\n      |\r\n----x   -----\r\n      |\r\n```\r\n\r\nAt the moment we still penalize turns from the top, right and bottom into the left way.\r\n\r\n-----------------------------------------------------------------------------------------------------------\r\n\r\nNow here is the same situation for stop signs:\r\n- https://www.openstreetmap.org/edit?node=3880659210#map=20/52.50539/13.42233\r\n- https://www.mapillary.com/app/?lat=52.50494326588188&lng=13.422097224584917&z=17&focus=photo&pKey=upgECljcFxrpxkzOVhCKUA\r\n\r\nThis stop sign only applies to one direction of the way. If we implement stop signs similarly to traffic lights, we're facing the same issue there.\r\n\r\nReferences:\r\n- http://wiki.openstreetmap.org/wiki/Tag:highway%3Dtraffic_signals\r\n- http://wiki.openstreetmap.org/wiki/Key:traffic_signals:direction\r\n"}}
{"actor":{"display_login":"daniel-j-h"}}