add empty speed tables to foot.lua

This commit is contained in:
Michael Krasnyk 2017-02-01 22:08:14 +01:00 committed by Patrick Niklaus
parent 6da4d918d0
commit 5fd6355829
2 changed files with 28 additions and 19 deletions

View File

@ -21,7 +21,7 @@ local profile = {
oneway_handling = 'specific', -- respect 'oneway:foot' but not 'oneway' oneway_handling = 'specific', -- respect 'oneway:foot' but not 'oneway'
traffic_light_penalty = 2, traffic_light_penalty = 2,
u_turn_penalty = 2, u_turn_penalty = 2,
barrier_whitelist = Set { barrier_whitelist = Set {
'cycle_barrier', 'cycle_barrier',
'bollard', 'bollard',
@ -34,19 +34,19 @@ local profile = {
'no', 'no',
'block' 'block'
}, },
access_tag_whitelist = Set { access_tag_whitelist = Set {
'yes', 'yes',
'foot', 'foot',
'permissive', 'permissive',
'designated' 'designated'
}, },
access_tag_blacklist = Set { access_tag_blacklist = Set {
'no', 'no',
'private', 'private',
'agricultural', 'agricultural',
'forestry', 'forestry',
'delivery' 'delivery'
}, },
@ -63,11 +63,11 @@ local profile = {
suffix_list = Set { suffix_list = Set {
'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW', 'North', 'South', 'West', 'East' 'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW', 'North', 'South', 'West', 'East'
}, },
avoid = Set { avoid = Set {
'impassable' 'impassable'
}, },
speeds = Sequence { speeds = Sequence {
highway = { highway = {
primary = walking_speed, primary = walking_speed,
@ -101,22 +101,31 @@ local profile = {
man_made = { man_made = {
pier = walking_speed pier = walking_speed
}, },
leisure = { leisure = {
track = walking_speed track = walking_speed
} }
}, },
route_speeds = { route_speeds = {
ferry = 5 ferry = 5
}, },
bridge_speeds = {
},
surface_speeds = { surface_speeds = {
fine_gravel = walking_speed*0.75, fine_gravel = walking_speed*0.75,
gravel = walking_speed*0.75, gravel = walking_speed*0.75,
pebblestone = walking_speed*0.75, pebblestone = walking_speed*0.75,
mud = walking_speed*0.5, mud = walking_speed*0.5,
sand = walking_speed*0.5 sand = walking_speed*0.5
},
tracktype_speeds = {
},
smoothness_speeds = {
} }
} }
@ -221,7 +230,7 @@ function way_function(way, result)
-- set name, ref and pronunciation -- set name, ref and pronunciation
'handle_names' 'handle_names'
} }
Handlers.run(handlers,way,result,data,profile) Handlers.run(handlers,way,result,data,profile)
end end

View File

@ -246,8 +246,8 @@ function Handlers.handle_side_roads(way,result,data,profile)
local sideway = way:get_value_by_key("side_road") local sideway = way:get_value_by_key("side_road")
if "yes" == sideway or if "yes" == sideway or
"rotary" == sideway then "rotary" == sideway then
result.forward_speed = result.forward_speed * side_road_speed_multiplier result.forward_speed = result.forward_speed * profile.side_road_speed_multiplier
result.backward_speed = result.backward_speed * side_road_speed_multiplier result.backward_speed = result.backward_speed * profile.side_road_speed_multiplier
end end
end end