forked from osm2pgsql-dev/osm2pgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tagtransform-lua.hpp
42 lines (31 loc) · 1.2 KB
/
tagtransform-lua.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef TAGTRANSFORM_LUA_H
#define TAGTRANSFORM_LUA_H
#include <string>
#include "tagtransform.hpp"
extern "C" {
#include <lua.h>
}
class lua_tagtransform_t : public tagtransform_t
{
lua_tagtransform_t(lua_tagtransform_t const &other) = default;
public:
lua_tagtransform_t(options_t const *options);
~lua_tagtransform_t();
std::unique_ptr<tagtransform_t> clone() const override;
bool filter_tags(osmium::OSMObject const &o, int *polygon, int *roads,
taglist_t &out_tags, bool strict = false) override;
bool filter_rel_member_tags(taglist_t const &rel_tags,
osmium::memory::Buffer const &members,
rolelist_t const &member_roles,
int *make_boundary, int *make_polygon,
int *roads, taglist_t &out_tags,
bool allow_typeless = false) override;
private:
void open_style();
void check_lua_function_exists(std::string const &func_name);
lua_State *L;
std::string m_node_func, m_way_func, m_rel_func, m_rel_mem_func;
std::string m_lua_file;
bool m_extra_attributes;
};
#endif // TAGTRANSFORM_LUA_H