Skip to content

Commit

Permalink
Normalizes spaces in profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-j-h authored and Patrick Niklaus committed Jul 19, 2017
1 parent ababeb3 commit 48824c4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
44 changes: 22 additions & 22 deletions profiles/bicycle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,42 +53,42 @@ 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 { },

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'
},

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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.
Expand Down
34 changes: 17 additions & 17 deletions profiles/car.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function setup()
use_turn_restrictions = true,
traffic_light_penalty = 2,
},

default_mode = mode.driving,
default_speed = 10,
oneway_handling = true,
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -404,7 +404,7 @@ function process_turn (profile, turn)
else
turn.weight = turn.duration
end

if profile.properties.weight_name == 'routability' then
-- penalize turns from non-local access only segments onto local access only tags
if not turn.source_restricted and turn.target_restricted then
Expand Down
2 changes: 1 addition & 1 deletion profiles/foot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48824c4

Please sign in to comment.