[email protected] (Andrew M. Bishop) writes: > I decided that what would be fun to implement is a routing algorithm > that can find the best (shortest or quickest) route between any two > OSM highway nodes. I know that there are other routing algorithms > available but this started as an intellectual exercise so I developed > my own. It seemed to work so I added a fancy web front end to it and > put it on a server.
> The router itself (requires JavaScript for the map etc): > > http://www.gedanken.org.uk/mapping/router/router.html On a topic related to the other ongoing discussion about tagging footway and cycleway it is obviously important for a router that things are tagged consistently. The router is currently mapping highway=path to be identical to highway=footway so that foot=yes is implied. This will cause a problem with the router if the path is also bicycle=designated. When you run the router with bicycle as your mode of transport and disable using footways (which is the default state for bicycles) then it won't take the path. Two ways to handle this would be: 1) Add path as a highway type (between track and bridleway I think) but default it to foot only when parsing the OSM data (so that bicycles don't get routed along it unless bicycle=designated). When routing the default for bicycle would include path. 2) Make the default for routing a bicycle to include footway (which sounds odd, but it won't route a bicycle along it unless it is bicycle=designated). I have also realised that I am not currently handling *=designated so that is a change that I definitely need to make. It isn't practical to include options to enable or disable all diferent highway types so other implicit rules that I implement are: highway=byway|unsurfaced|unpaved => highway=track highway=steps|pedestrian|walkway => highway=footway highway=road => highway=unclassified If anybody tries generating a route that doesn't go the way that they think then most likely it is because of a tagging problem or a tag that the router doesn't understand. It could also be ways that don't share nodes at junctions but have one each. I have found (and fixed) examples of both of these while testing the router. There is also the possibility that the router's implicit rules (like the path one above) might be causing the problem. -- Andrew. ---------------------------------------------------------------------- Andrew M. Bishop [email protected] _______________________________________________ Talk-GB mailing list [email protected] http://lists.openstreetmap.org/listinfo/talk-gb

