summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Hansson <steha708@edu.liu.se>2020-12-16 09:49:02 +0100
committerNewbyte <steha708@liu.se>2020-12-16 09:49:02 +0100
commit3c73ca93fe9896681fb270f0782385b0a9e5d7f1 (patch)
treef11645fa679cae350718995bcc416436253c811e
parent3af5a89bdefc20ffdc4b66a5ae2a62a8cbabe36c (diff)
downloadtdde25-3c73ca93fe9896681fb270f0782385b0a9e5d7f1.tar.gz
Add more stuff to suitable_bike
-rw-r--r--store.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/store.py b/store.py
index 2930e19..5ba289b 100644
--- a/store.py
+++ b/store.py
@@ -195,9 +195,15 @@ def suitable_bike(way):
tags = way['tags']
suitable_generic_type = tags['highway'] in suitable_highway_types_bike
- suitable_bike = tags['bicycle'] == 'yes' if 'bicycle' in tags else False
+ suitable_bike = False
+ # This implies you can go by bike for some reason
+ is_segregated = 'segregated' in tags
- return suitable_generic_type or suitable_bike
+ if 'bicycle' in tags:
+ bicycle_tag = tags['bicycle']
+ suitable_bike = bicycle_tag == 'yes' or bicycle_tag == 'designated'
+
+ return suitable_generic_type or suitable_bike or is_segregated
suitable_highway_types_car = [