Add flag to allow skipping calling node function for nodes with no tags.
This commit is contained in:
committed by
Patrick Niklaus
parent
5c8e2b6f78
commit
cd8fb82215
@@ -249,7 +249,9 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
"max_turn_weight",
|
||||
sol::property(&ProfileProperties::GetMaxTurnWeight),
|
||||
"force_split_edges",
|
||||
&ProfileProperties::force_split_edges);
|
||||
&ProfileProperties::force_split_edges,
|
||||
"call_tagless_node_function",
|
||||
&ProfileProperties::call_tagless_node_function);
|
||||
|
||||
context.state.new_usertype<std::vector<std::string>>(
|
||||
"vector",
|
||||
@@ -510,7 +512,9 @@ void Sol2ScriptingEnvironment::ProcessElements(
|
||||
{
|
||||
case osmium::item_type::node:
|
||||
result_node.clear();
|
||||
if (local_context.has_node_function)
|
||||
if (local_context.has_node_function &&
|
||||
(!static_cast<const osmium::Node &>(*entity).tags().empty() ||
|
||||
local_context.properties.call_tagless_node_function))
|
||||
{
|
||||
local_context.ProcessNode(static_cast<const osmium::Node &>(*entity),
|
||||
result_node);
|
||||
|
||||
Reference in New Issue
Block a user