forked from osm2pgsql-dev/osm2pgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tagtransform.hpp
59 lines (45 loc) · 1.96 KB
/
tagtransform.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef TAGTRANSFORM_H
#define TAGTRANSFORM_H
#include "config.h"
#include "osmtypes.hpp"
#include <string>
struct options_t;
struct export_list;
#ifdef HAVE_LUA
extern "C" {
#include <lua.h>
}
#endif
class tagtransform {
public:
tagtransform(const options_t *options_);
~tagtransform();
unsigned filter_node_tags(const taglist_t &tags, const export_list &exlist,
taglist_t &out_tags, bool strict = false);
unsigned filter_way_tags(const taglist_t &tags, int *polygon, int *roads,
const export_list &exlist, taglist_t &out_tags, bool strict = false);
unsigned filter_rel_tags(const taglist_t &tags, const export_list &exlist,
taglist_t &out_tags, bool strict = false);
unsigned filter_rel_member_tags(const taglist_t &rel_tags,
const multitaglist_t &member_tags, const rolelist_t &member_roles,
int *member_superseeded, int *make_boundary, int *make_polygon, int *roads,
const export_list &exlist, taglist_t &out_tags, bool allow_typeless = false);
private:
unsigned lua_filter_basic_tags(OsmType type, const taglist_t &tags,
int *polygon, int *roads, taglist_t &out_tags);
unsigned c_filter_basic_tags(OsmType type, const taglist_t &tags, int *polygon,
int *roads, const export_list &exlist,
taglist_t &out_tags, bool strict);
unsigned int lua_filter_rel_member_tags(const taglist_t &rel_tags,
const multitaglist_t &members_tags, const rolelist_t &member_roles,
int *member_superseeded, int *make_boundary, int *make_polygon, int *roads,
taglist_t &out_tags);
void check_lua_function_exists(const std::string &func_name);
const options_t* options;
const bool transform_method;
#ifdef HAVE_LUA
lua_State *L;
const std::string m_node_func, m_way_func, m_rel_func, m_rel_mem_func;
#endif
};
#endif //TAGTRANSFORM_H