Normalizes spaces in profiles

This commit is contained in:
Daniel J. Hofmann 2017-07-19 15:32:42 +02:00 committed by Patrick Niklaus
parent ababeb3a69
commit 48824c4c8a
3 changed files with 40 additions and 40 deletions

View File

@ -53,17 +53,17 @@ function setup()
},
access_tag_whitelist = Set {
'yes',
'permissive',
'designated'
'yes',
'permissive',
'designated'
},
access_tag_blacklist = Set {
'no',
'private',
'agricultural',
'forestry',
'delivery'
'no',
'private',
'agricultural',
'forestry',
'delivery'
},
restricted_access_tag_list = Set { },
@ -71,24 +71,24 @@ function setup()
restricted_highway_whitelist = Set { },
access_tags_hierarchy = Sequence {
'bicycle',
'vehicle',
'access'
'bicycle',
'vehicle',
'access'
},
restrictions = Set {
'bicycle'
'bicycle'
},
cycleway_tags = Set {
'track',
'lane',
'opposite',
'opposite_lane',
'opposite_track',
'share_busway',
'sharrow',
'shared',
'track',
'lane',
'opposite',
'opposite_lane',
'opposite_track',
'share_busway',
'sharrow',
'shared',
'shared_lane'
},
@ -206,7 +206,7 @@ local function parse_maxspeed(source)
return n
end
function process_node (profile, node, result)
function process_node(profile, node, result)
-- parse access and barrier tags
local highway = node:get_value_by_key("highway")
local is_crossing = highway and highway == "crossing"
@ -493,7 +493,7 @@ function handle_bicycle_tags(profile,way,result,data)
end
end
end
function process_way (profile, way, result)
function process_way(profile, way, result)
-- the initial filtering of ways based on presence of tags
-- affects processing times significantly, because all ways
-- have to be checked.

View File

@ -140,19 +140,19 @@ function setup()
["drive-thru"] = 0.5
},
restricted_highway_whitelist = Set {
'motorway',
'motorway_link',
'trunk',
'trunk_link',
'primary',
'primary_link',
'secondary',
'secondary_link',
'tertiary',
'tertiary_link',
'residential',
'living_street',
restricted_highway_whitelist = Set {
'motorway',
'motorway_link',
'trunk',
'trunk_link',
'primary',
'primary_link',
'secondary',
'secondary_link',
'tertiary',
'tertiary_link',
'residential',
'living_street',
},
route_speeds = {
@ -262,7 +262,7 @@ function setup()
}
end
function process_node (profile, node, result)
function process_node(profile, node, result)
-- parse access and barrier tags
local access = find_access_tag(node, profile.access_tags_hierarchy)
if access then
@ -375,7 +375,7 @@ function process_way(profile, way, result)
WayHandlers.run(profile,way,result,data,handlers)
end
function process_turn (profile, turn)
function process_turn(profile, turn)
-- Use a sigmoid function to return a penalty that maxes out at turn_penalty
-- over the space of 0-180 degrees. Values here were chosen by fitting
-- the function to some turn penalty samples from real driving.

View File

@ -137,7 +137,7 @@ function setup()
}
end
function process_node (profile, node, result)
function process_node(profile, node, result)
-- parse access and barrier tags
local access = find_access_tag(node, profile.access_tags_hierarchy)
if access then