Skip to content

Commit 7f1d847

Browse files
committed
Don’t route on motorroads by foot or bicycle (Project-OSRM#6697)
1 parent 5723eaa commit 7f1d847

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

profiles/bicycle.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ function setup()
217217
avoid = Set {
218218
'impassable',
219219
'construction',
220-
'proposed'
220+
'proposed',
221+
'motorroad'
221222
}
222223
}
223224
end

profiles/foot.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ function setup()
7070

7171
avoid = Set {
7272
'impassable',
73-
'proposed'
73+
'proposed',
74+
'motorroad'
7475
},
7576

7677
speeds = Sequence {

profiles/lib/way_handlers.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,11 @@ function WayHandlers.blocked_ways(profile,way,result,data)
634634
return false
635635
end
636636

637+
-- motorroad
638+
if profile.avoid.motorroad and way:get_value_by_key("motorroad") == "yes" then
639+
return false
640+
end
641+
637642
-- In addition to the highway=construction tag above handle the construction=* tag
638643
-- http://wiki.openstreetmap.org/wiki/Key:construction
639644
-- https://taginfo.openstreetmap.org/keys/construction#values

0 commit comments

Comments
 (0)