Hi there,
I am working on non-osm data by using OSRM engine recently. Since the format/keywords of restrictions are different with osm data, I am trying to modify the code/profile to fit into the engine.
In extractor/scripting_environment_lua.cpp
void Sol2ScriptingEnvironment::ProcessElements(...) {
case osmium::item_type::node:
{
...
local_context.ProcessNode(node, result_node, relations);
...
}
break;
case osmium::item_type::way:
{
...
local_context.ProcessWay(way, result_way, relations);
...
}
break;
case osmium::item_type::relation:
{
...
if (auto result_res = restriction_parser.TryParse(relation))
{
resulting_restrictions.push_back(*result_res);
}
...
}
}
ProcessWay and ProcessNode to be addressed by calling Lua script, it's easy to modify non-osm data to fit into the engine.
But for restrictions, it's handled in C++ in TryParse.
My question is, is there any reasons/advantages/thoughts that we use different methods to handle restrictions? Why not to deal with it in Lua script similar with ProcessWay?
Hi there, I am working on non-osm data by using OSRM engine recently. Since the format/keywords of restrictions are different with osm data, I am trying to modify the code/profile to fit into the engine.
In extractor/scripting_environment_lua.cpp
ProcessWay and ProcessNode to be addressed by calling Lua script, it's easy to modify non-osm data to fit into the engine. But for restrictions, it's handled in C++ in TryParse.
My question is, is there any reasons/advantages/thoughts that we use different methods to handle restrictions? Why not to deal with it in Lua script similar with ProcessWay?
Thanks so much for your help.