{"action":"created","issue":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1321","labels_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1321/labels{/name}","comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1321/comments","events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1321/events","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/1321","id":52808325,"number":1321,"title":"Weird routing problem via 'small' custom shapefile network","user":{"login":"Svantulden","id":7554912,"avatar_url":"https://avatars.githubusercontent.com/u/7554912?v=3","gravatar_id":"","url":"https://api.github.com/users/Svantulden","html_url":"https://github.com/Svantulden","followers_url":"https://api.github.com/users/Svantulden/followers","following_url":"https://api.github.com/users/Svantulden/following{/other_user}","gists_url":"https://api.github.com/users/Svantulden/gists{/gist_id}","starred_url":"https://api.github.com/users/Svantulden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Svantulden/subscriptions","organizations_url":"https://api.github.com/users/Svantulden/orgs","repos_url":"https://api.github.com/users/Svantulden/repos","events_url":"https://api.github.com/users/Svantulden/events{/privacy}","received_events_url":"https://api.github.com/users/Svantulden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-12-24T09:48:09Z","updated_at":"2015-01-05T10:10:41Z","closed_at":null,"body":"Hi, \r\n\r\nFirst of all, thanks for your amazing work on OSRM! I find it truly fascinating that such a solid routing engine is open source and actively contributed to. \r\n\r\nNow, I want to use OSRM to route via a relatively small route network shapefile. The way I accomplish this is by converting the shapefile to OSM, consisting of nodes and ways. It is a closed network, so we can assume it is fully routable. Then I add the `highway=customnetwork` tag to the ways, to set a speed constant and use it in the routing profile. \r\n\r\nI extract and prepare the OSM file and the routing works about 80% without issues. Though in some cases, I get weird results. To illustrate this, I made [this tiny extract](https://gist.github.com/Svantulden/6088eaa0eb850d12d85c) of the OSM file. \r\n\r\n![Wrong](https://cloud.githubusercontent.com/assets/7554912/5547260/1a01803c-8b57-11e4-9c63-18c58981a460.png)\r\n^^ - Here it goes wrong. This uses [this API call](http://localhost:20010/viaroute?instructions=true&alt=true&loc=51.4638221883968,5.817440305750472&u=true&loc=51.44381962617868,5.825116287599811&u=true&loc=51.43831342481577,5.859856289621013&u=true). At the second waypoint, it searches the nearest 'fork', to 'turn' and go the same way back to the 3rd waypoint.\r\n![Right](https://cloud.githubusercontent.com/assets/7554912/5547294/8a2f477c-8b57-11e4-96d7-93b1cd80bba6.png)\r\n^^ - Here it goes right (the other direction). This uses [this API call](http://localhost:20010/viaroute?instructions=true&alt=true&loc=51.43831342481577,5.859856289621013&u=true&loc=51.44381962617868,5.825116287599811&u=true&loc=51.4638221883968,5.817440305750472&u=true).\r\n\r\nIn some cases, when I have three waypoints, routing from the 2nd to the 3rd, it takes a long detour to find the nearest turning circle or fork in the road where it can 'turn'. This is unexpected, especially because when routing the other way around, it routes normally between the junction nodes. Because of this, I thought it might had something to do with the engine assuming oneway. So I explicitly added the `oneway=false` tag, but the results were the same. \r\n\r\nHave you got any idea if I am doing something wrong here, or that it can be a bug in OSRM? \r\n\r\n**PS.** To reproduce the problem, you can download [the small OSM extract](https://gist.github.com/Svantulden/6088eaa0eb850d12d85c) I made of the network and use the same API calls beneath the screenshots."},"comment":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/comments/68688863","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/1321#issuecomment-68688863","issue_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1321","id":68688863,"user":{"login":"DennisOSRM","id":1067895,"avatar_url":"https://avatars.githubusercontent.com/u/1067895?v=3","gravatar_id":"","url":"https://api.github.com/users/DennisOSRM","html_url":"https://github.com/DennisOSRM","followers_url":"https://api.github.com/users/DennisOSRM/followers","following_url":"https://api.github.com/users/DennisOSRM/following{/other_user}","gists_url":"https://api.github.com/users/DennisOSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/DennisOSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DennisOSRM/subscriptions","organizations_url":"https://api.github.com/users/DennisOSRM/orgs","repos_url":"https://api.github.com/users/DennisOSRM/repos","events_url":"https://api.github.com/users/DennisOSRM/events{/privacy}","received_events_url":"https://api.github.com/users/DennisOSRM/received_events","type":"User","site_admin":false},"created_at":"2015-01-05T10:10:41Z","updated_at":"2015-01-05T10:10:41Z","body":"> Would you have an explanation for this?\r\n\r\nAt this point we don't have a good explanation. Only things that come to mind are related to oneway streets and turn restrictions."}}