Front-page image on 01 Dec 2007
pyroute has got its first attempt at 'weighting' routes (preferring some types of route over others based on what they are)
Here, we're looking at a route across Bedford, with the "cycle" mode selected.
There are many 'shorter' routes which use the main roads. If you do this route on TomTom or Google Maps it will demand that you use the main roads.
But see how it's following back streets? It goes down to the river and follows a cycle path to the next bridge. Then it follows the Embankment (a residential road) along the river. If the cycle path along the river there had been marked, it might even have directed you through the park.
Well that's the static case basically sorted. Now the only thing remaining is to fiddle with weightings. e.g. tell it you're on a mountain bike so that you get muddy tracks, or that you're a nervous driver and want to avoid motorways, or that it's rush-hour and all the A-roads are full of traffic and you want to use the smallest roads possible to get across a town...
then it needs more information. How 'good' is a route. How scenic is a walk. Is that cycleway your favourite route or is it an annoyance? How fast can you *actually* travel on that B-road?
pyroute has full access to OpenStreetMap tagging, so if you mark a cycleway as "annoying overhanging branches = yes" or "delay = these traffic lights take forever to let you across" and want to make pyroute use that information then it will all just work.
if(tags.get('surface') == 'mud' and self.transport == 'cycle'): if(self.options.get('fat_tyres')): weighting = weighting * 1.1 else: weighting = weighting * 0.9
Click on a date/time to view the file as it appeared at that time.
|current||20:11, 8 November 2007||410 × 270 (157 KB)||Ojw|
- You cannot overwrite this file.