{"action":"created","issue":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/3625","repository_url":"https://api.github.com/repos/Project-OSRM/osrm-backend","labels_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/3625/labels{/name}","comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/3625/comments","events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/3625/events","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/3625","id":203828807,"number":3625,"title":"map matching returns name for the wrong direction","user":{"login":"mortada","id":1642081,"avatar_url":"https://avatars.githubusercontent.com/u/1642081?v=3","gravatar_id":"","url":"https://api.github.com/users/mortada","html_url":"https://github.com/mortada","followers_url":"https://api.github.com/users/mortada/followers","following_url":"https://api.github.com/users/mortada/following{/other_user}","gists_url":"https://api.github.com/users/mortada/gists{/gist_id}","starred_url":"https://api.github.com/users/mortada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortada/subscriptions","organizations_url":"https://api.github.com/users/mortada/orgs","repos_url":"https://api.github.com/users/mortada/repos","events_url":"https://api.github.com/users/mortada/events{/privacy}","received_events_url":"https://api.github.com/users/mortada/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-01-28T20:21:10Z","updated_at":"2017-01-30T21:29:52Z","closed_at":null,"body":"Using the v5.5.4 release, I notice that map matching can map a trace to the wrong direction. Here is a small example that reproduces the problem.\r\n\r\nGiven the following trace/query, which goes from west to east:\r\n\r\n`/match/v1/car/-120.147778,34.392861;-120.147695,34.392889?annotations=true&overview=false`\r\n\r\nand the following OSM:\r\n```\r\n<osm generator=\"test\" version=\"0.6\">\r\n<node id=\"1\" lon=\"-120.1467783\" lat=\"34.3932086\" version=\"1\" changeset=\"1\" timestamp=\"2017-01-19T18:37:02Z\" />\r\n<node id=\"2\" lon=\"-120.147782\" lat=\"34.39286\" version=\"1\" changeset=\"1\" timestamp=\"2017-01-19T18:37:02Z\" />\r\n<way id=\"1\" version=\"1\" changeset=\"1\" timestamp=\"2017-01-19T18:37:29Z\">\r\n<nd ref=\"1\" />\r\n<nd ref=\"2\" />\r\n<tag k=\"highway\" v=\"secondary\" />\r\n<tag k=\"oneway\" v=\"yes\" />\r\n<tag k=\"name\" v=\"westbound\" />\r\n</way>\r\n<way id=\"2\" version=\"1\" changeset=\"1\" timestamp=\"2017-01-19T18:37:29Z\">\r\n<nd ref=\"2\" />\r\n<nd ref=\"1\" />\r\n<tag k=\"highway\" v=\"secondary\" />\r\n<tag k=\"oneway\" v=\"yes\" />\r\n<tag k=\"name\" v=\"eastbound\" />\r\n</way>\r\n</osm>\r\n```\r\n\r\nthe resulting matched name is the wrong direction (westbound) \r\n```\r\n{\"tracepoints\":[{\"location\":[-120.147778,34.392861],\"hint\":\"AAAAAAEAAIAEAAAAUQAAAAEAAAAAAAAAAAAAAAAAAAABAACAvrDW-B3LDAK-sNb4HcsMAgAAAQF_0OeL\",\"matchings_index\":0,\"waypoint_index\":0,\"name\":\"westbound\"},{\"location\":[-120.147695,34.392889],\"hint\":\"AAAAAAEAAIAEAAAASgAAAAgAAAAAAAAAAAAAAAAAAAABAACAEbHW-DnLDAIRsdb4OcsMAgAAAQF_0OeL\",\"matchings_index\":0,\"waypoint_index\":1,\"name\":\"westbound\"}],\"matchings\":[{\"distance\":8.2,\"duration\":0.7,\"legs\":[{\"distance\":8.2,\"steps\":[],\"duration\":0.7,\"annotation\":{\"nodes\":[2,1],\"datasources\":[0],\"duration\":[7.4],\"distance\":[8.22993]},\"summary\":\"\"}],\"confidence\":0.980289}],\"code\":\"Ok\"}\r\n```\r\n\r\nNote that my OSM is such that both ways share the same nodes. I remember seeing this same problem in v4.x and it was fixed in v4.x. But this does not seem to work in v5.x.\r\n\r\nI'd like to be upgrade from v4 to v5 and any help would be appreciate. Thanks\r\n"},"comment":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/comments/276196777","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/3625#issuecomment-276196777","issue_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/3625","id":276196777,"user":{"login":"Komzpa","id":810638,"avatar_url":"https://avatars.githubusercontent.com/u/810638?v=3","gravatar_id":"","url":"https://api.github.com/users/Komzpa","html_url":"https://github.com/Komzpa","followers_url":"https://api.github.com/users/Komzpa/followers","following_url":"https://api.github.com/users/Komzpa/following{/other_user}","gists_url":"https://api.github.com/users/Komzpa/gists{/gist_id}","starred_url":"https://api.github.com/users/Komzpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Komzpa/subscriptions","organizations_url":"https://api.github.com/users/Komzpa/orgs","repos_url":"https://api.github.com/users/Komzpa/repos","events_url":"https://api.github.com/users/Komzpa/events{/privacy}","received_events_url":"https://api.github.com/users/Komzpa/received_events","type":"User","site_admin":false},"created_at":"2017-01-30T21:29:52Z","updated_at":"2017-01-30T21:29:52Z","body":"Can this be also done by mapping the road as two separate in space one-ways?\r\nSimilar to this: http://www.openstreetmap.org/#map=19/59.94014/30.27879"}}
{"actor":{"display_login":"Komzpa"}}