Merge pull request #973 from DennisOSRM/fix/clean_profile_indentation

cleanup indentation of lua profiles
This commit is contained in:
Dennis Luxen 2014-04-01 17:07:39 +02:00
commit 05c33bee78
3 changed files with 425 additions and 428 deletions

View File

@ -1,7 +1,7 @@
require("lib/access") require("lib/access")
-- Begin of globals -- Begin of globals
barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true} barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true }
access_tag_whitelist = { ["yes"] = true, ["permissive"] = true, ["designated"] = true } access_tag_whitelist = { ["yes"] = true, ["permissive"] = true, ["designated"] = true }
access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestery"] = true } access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestery"] = true }
access_tag_restricted = { ["destination"] = true, ["delivery"] = true } access_tag_restricted = { ["destination"] = true, ["delivery"] = true }
@ -187,8 +187,9 @@ function way_function (way)
elseif "" ~= name then elseif "" ~= name then
way.name = name way.name = name
else else
way.name = "{highway:"..highway.."}" -- if no name exists, use way type -- if no name exists, use way type
-- this encoding scheme is excepted to be a temporary solution -- this encoding scheme is excepted to be a temporary solution
way.name = "{highway:"..highway.."}"
end end
-- roundabout handling -- roundabout handling
@ -346,8 +347,6 @@ function way_function (way)
way.backward_speed = maxspeed_backward way.backward_speed = maxspeed_backward
end end
way.type = 1 way.type = 1
return 1 return 1
end end

View File

@ -1,7 +1,7 @@
-- Begin of globals -- Begin of globals
--require("lib/access") --function temporarily inlined --require("lib/access") --function temporarily inlined
barrier_whitelist = { ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true, ["entrance"] = true} barrier_whitelist = { ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true, ["entrance"] = true }
access_tag_whitelist = { ["yes"] = true, ["motorcar"] = true, ["motor_vehicle"] = true, ["vehicle"] = true, ["permissive"] = true, ["designated"] = true } access_tag_whitelist = { ["yes"] = true, ["motorcar"] = true, ["motor_vehicle"] = true, ["vehicle"] = true, ["permissive"] = true, ["designated"] = true }
access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestry"] = true, ["emergency"] = true } access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestry"] = true, ["emergency"] = true }
access_tag_restricted = { ["destination"] = true, ["delivery"] = true } access_tag_restricted = { ["destination"] = true, ["delivery"] = true }
@ -202,7 +202,7 @@ function way_function (way)
elseif "" ~= name then elseif "" ~= name then
way.name = name way.name = name
-- else -- else
-- way.name = highway -- if no name exists, use way type -- way.name = highway -- if no name exists, use way type
end end
if "roundabout" == junction then if "roundabout" == junction then
@ -229,8 +229,7 @@ function way_function (way)
oneway == "true" or oneway == "true" or
junction == "roundabout" or junction == "roundabout" or
(highway == "motorway_link" and oneway ~="no") or (highway == "motorway_link" and oneway ~="no") or
(highway == "motorway" and oneway ~= "no") (highway == "motorway" and oneway ~= "no") then
then
way.direction = Way.oneway way.direction = Way.oneway
end end
end end
@ -257,7 +256,6 @@ function way_function (way)
end end
-- These are wrappers to parse vectors of nodes and ways and thus to speed up any tracing JIT -- These are wrappers to parse vectors of nodes and ways and thus to speed up any tracing JIT
function node_vector_function(vector) function node_vector_function(vector)
for v in vector.nodes do for v in vector.nodes do
node_function(v) node_function(v)