summaryrefslogtreecommitdiff
path: root/chimere/route.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/route.py')
-rw-r--r--chimere/route.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/chimere/route.py b/chimere/route.py
index 9c8b59c..040a7be 100644
--- a/chimere/route.py
+++ b/chimere/route.py
@@ -39,7 +39,8 @@ class Router:
class RoutinoRouter(Router):
re_desc = [re.compile("<tr class='n'>"), re.compile("<tr class='s'>"),
re.compile("<tr class='t'>")]
- def route(self, lon1, lat1, lon2, lat2, steps=[], transport='foot'):
+ def route(self, lon1, lat1, lon2, lat2, steps=[], transport='foot',
+ speed=None):
'''
Get a list of geojson polylines and route description
'''
@@ -54,6 +55,11 @@ class RoutinoRouter(Router):
"--lat1=%0.15f" % lat1,
"--lon1=%0.15f" % lon1,
]
+ if speed:
+ args += ["--speed-%s=%s" % (highway, unicode(speed))
+ for highway in ('motorway', 'trunk', 'primary', 'secondary',
+ 'tertiary', 'unclassified', 'residential', 'service',
+ 'track','cycleway','path','steps')]
lonlat_index = 1
for lon, lat in steps:
lonlat_index += 1