forked from osm2pgsql-dev/osm2pgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtagtransform.cpp
More file actions
34 lines (28 loc) · 1015 Bytes
/
tagtransform.cpp
File metadata and controls
34 lines (28 loc) · 1015 Bytes
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
/**
* SPDX-License-Identifier: GPL-2.0-or-later
*
* This file is part of osm2pgsql (https://osm2pgsql.org/).
*
* Copyright (C) 2006-2026 by the osm2pgsql developer community.
* For a full list of authors see the git log.
*/
#include "tagtransform.hpp"
#include "logging.hpp"
#include "options.hpp"
#include "tagtransform-c.hpp"
#include "tagtransform-lua.hpp"
#include <memory>
std::unique_ptr<tagtransform_t>
tagtransform_t::make_tagtransform(options_t const *options,
export_list_t const &exlist)
{
if (!options->tag_transform_script.empty()) {
log_debug("Using lua based tag transformations with script {}",
options->tag_transform_script);
return std::make_unique<lua_tagtransform_t>(
&options->tag_transform_script, options->extra_attributes);
}
log_debug("Using built-in tag transformations");
return std::make_unique<c_tagtransform_t>(options, exlist);
}
tagtransform_t::~tagtransform_t() = default;