revert changes to car profile

This commit is contained in:
Emil Tin 2012-10-04 08:33:52 +02:00
parent 59025ca2da
commit c1a08af00d

View File

@ -2,7 +2,7 @@
barrier_whitelist = { ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["no"] = true, ["sally_port"] = true, ["gate"] = true} barrier_whitelist = { ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["no"] = true, ["sally_port"] = true, ["gate"] = 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, ["foot"] = true, ["bicycle"] = 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 }
access_tags = { "motorcar", "motor_vehicle", "vehicle" } access_tags = { "motorcar", "motor_vehicle", "vehicle" }
service_tag_restricted = { ["parking_aisle"] = true } service_tag_restricted = { ["parking_aisle"] = true }
@ -44,29 +44,26 @@ function node_function (node)
local access = node.tags:Find ("access") local access = node.tags:Find ("access")
local traffic_signal = node.tags:Find("highway") local traffic_signal = node.tags:Find("highway")
-- flag node if it carries a traffic light --flag node if it carries a traffic light
if traffic_signal == "traffic_signals" then if traffic_signal == "traffic_signals" then
node.traffic_light = true node.traffic_light = true;
end end
-- parse access and barrier tags if "" ~= barrier and obey_bollards then
if access ~= "" then node.bollard = true; -- flag as unpassable and then check
if access_tag_blacklist[access] then
node.bollard = true if "yes" == access then
else node.bollard = false;
node.bollard = false return
end end
elseif barrier ~= "" then
if barrier_whitelist[barrier] then --reverse the previous flag if there is an access tag specifying entrance
node.bollard = false if node.bollard and (barrier_whitelist[barrier] or access_tag_whitelist[access]) then
else node.bollard = false;
node.bollard = true return
end
else
node.bollard = false
end end
end
return 1
end end
function way_function (way, numberOfNodesInWay) function way_function (way, numberOfNodesInWay)