From 405f08b8075d56f6e06e5011a07f008f0cc834e0 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Fri, 10 Apr 2015 11:45:24 +0200 Subject: [PATCH 1/2] Make node location accessible --- extractor/scripting_environment.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/extractor/scripting_environment.cpp b/extractor/scripting_environment.cpp index 2b34b804754..431fa152295 100644 --- a/extractor/scripting_environment.cpp +++ b/extractor/scripting_environment.cpp @@ -91,6 +91,7 @@ void ScriptingEnvironment::init_lua_state(lua_State *lua_state) luabind::class_("Node") // .def("tags", &osmium::Node::tags) + .def("location", &osmium::Node::location) .def("get_value_by_key", &osmium::Node::get_value_by_key) .def("get_value_by_key", &get_value_by_key), From b76fc724fdac206a6fb159ea79f1aa63e5e401c7 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 13 Apr 2015 09:58:59 +0200 Subject: [PATCH 2/2] make node id available thru Lua bindings --- extractor/scripting_environment.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extractor/scripting_environment.cpp b/extractor/scripting_environment.cpp index 431fa152295..972772246ae 100644 --- a/extractor/scripting_environment.cpp +++ b/extractor/scripting_environment.cpp @@ -93,7 +93,8 @@ void ScriptingEnvironment::init_lua_state(lua_State *lua_state) // .def("tags", &osmium::Node::tags) .def("location", &osmium::Node::location) .def("get_value_by_key", &osmium::Node::get_value_by_key) - .def("get_value_by_key", &get_value_by_key), + .def("get_value_by_key", &get_value_by_key) + .def("id", &osmium::Node::id), luabind::class_("ResultNode") .def_readwrite("traffic_lights", &ExtractionNode::traffic_lights)