You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I need to add way_id to json output.
I edited car.lua to have way_id( result.way_id = way:id()). I dont know if its correct or not.
Now how can I add it json output?
function process_way(profile, way, result, relations)
-- the intial filtering of ways based on presence of tags
-- affects processing times significantly, because all ways
-- have to be checked.
-- to increase performance, prefetching and intial tag check
-- is done in directly instead of via a handler.
-- in general we should try to abort as soon as
-- possible if the way is not routable, to avoid doing
-- unnecessary work. this implies we should check things that
-- commonly forbids access early, and handle edge cases later.
-- data table for storing intermediate values during processing
local data = {
-- prefetch tags
highway = way:get_value_by_key('highway'),
bridge = way:get_value_by_key('bridge'),
route = way:get_value_by_key('route')
}
result.way_id = way:id()
-- perform an quick initial check and abort if the way is
-- obviously not routable.
-- highway or route tags must be in data table, bridge is optional
if (not data.highway or data.highway == '') and
(not data.route or data.route == '')
then
return
end
The text was updated successfully, but these errors were encountered:
Hello
I need to add way_id to json output.
I edited car.lua to have way_id( result.way_id = way:id()). I dont know if its correct or not.
Now how can I add it json output?
function process_way(profile, way, result, relations)
-- the intial filtering of ways based on presence of tags
-- affects processing times significantly, because all ways
-- have to be checked.
-- to increase performance, prefetching and intial tag check
-- is done in directly instead of via a handler.
-- in general we should try to abort as soon as
-- possible if the way is not routable, to avoid doing
-- unnecessary work. this implies we should check things that
-- commonly forbids access early, and handle edge cases later.
-- data table for storing intermediate values during processing
local data = {
-- prefetch tags
highway = way:get_value_by_key('highway'),
bridge = way:get_value_by_key('bridge'),
route = way:get_value_by_key('route')
}
result.way_id = way:id()
-- perform an quick initial check and abort if the way is
-- obviously not routable.
-- highway or route tags must be in data table, bridge is optional
if (not data.highway or data.highway == '') and
(not data.route or data.route == '')
then
return
end
The text was updated successfully, but these errors were encountered: