Skip to content

Commit 4ca2ed5

Browse files
committed
osmdata: remove unused projection member
1 parent 4cf7acc commit 4ca2ed5

22 files changed

+31
-42
lines changed

osm2pgsql.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
6969
}
7070

7171
//let osmdata orchestrate between the middle and the outs
72-
osmdata_t osmdata(middle, outputs, options.projection);
72+
osmdata_t osmdata(middle, outputs);
7373

7474
fprintf(stderr, "Using projection SRS %d (%s)\n",
7575
options.projection->target_srs(),

osmdata.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,16 @@
1414
#include "output.hpp"
1515

1616
osmdata_t::osmdata_t(std::shared_ptr<middle_t> mid_,
17-
std::shared_ptr<output_t> const &out_,
18-
std::shared_ptr<reprojection> proj)
19-
: mid(mid_), projection(proj)
17+
std::shared_ptr<output_t> const &out_)
18+
: mid(mid_)
2019
{
2120
outs.push_back(out_);
2221
with_extra = outs[0]->get_options()->extra_attributes;
2322
}
2423

2524
osmdata_t::osmdata_t(std::shared_ptr<middle_t> mid_,
26-
std::vector<std::shared_ptr<output_t> > const &outs_,
27-
std::shared_ptr<reprojection> proj)
28-
: mid(mid_), outs(outs_), projection(proj)
25+
std::vector<std::shared_ptr<output_t>> const &outs_)
26+
: mid(mid_), outs(outs_)
2927
{
3028
if (outs.empty()) {
3129
throw std::runtime_error("Must have at least one output, but none have "
@@ -35,10 +33,6 @@ osmdata_t::osmdata_t(std::shared_ptr<middle_t> mid_,
3533
with_extra = outs[0]->get_options()->extra_attributes;
3634
}
3735

38-
osmdata_t::~osmdata_t()
39-
{
40-
}
41-
4236
int osmdata_t::node_add(osmium::Node const &node)
4337
{
4438
mid->nodes_set(node);

osmdata.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@ class osmdata_t
1818
{
1919
public:
2020
osmdata_t(std::shared_ptr<middle_t> mid_,
21-
std::shared_ptr<output_t> const &out_,
22-
std::shared_ptr<reprojection> proj);
21+
std::shared_ptr<output_t> const &out_);
2322
osmdata_t(std::shared_ptr<middle_t> mid_,
24-
std::vector<std::shared_ptr<output_t> > const &outs_,
25-
std::shared_ptr<reprojection> proj);
26-
~osmdata_t();
23+
std::vector<std::shared_ptr<output_t>> const &outs_);
2724

2825
void start();
2926
void type_changed(osmium::item_type new_type);
@@ -44,7 +41,6 @@ class osmdata_t
4441
private:
4542
std::shared_ptr<middle_t> mid;
4643
std::vector<std::shared_ptr<output_t> > outs;
47-
std::shared_ptr<reprojection> projection;
4844
bool with_extra;
4945
};
5046

tests/fixture-tablespace-cleanup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ BASEDIR=`pwd`
66

77
TBLDIR=${BASEDIR}/osm2pgsql-test-tablespace
88

9-
if find $TBLDIR -maxdepth 1 -mindepth 1 -type d -name 'PG*'; then
10-
rm -r $TBLDIR/PG*
9+
if [ -d "$TBLDIR" ]; then
10+
find $TBLDIR -maxdepth 1 -mindepth 1 -type d -name 'PG*' -delete
1111
fi

tests/test-hstore-match-only.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main(int argc, char *argv[]) {
5555

5656
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
5757

58-
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
58+
osmdata_t osmdata(mid_pgsql, out_test);
5959

6060
testing::parse("tests/hstore-match-only.osm", "xml",
6161
options, &osmdata);

tests/test-options-projection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void check_tables(pg::tempdb *db, options_t &options,
4545
options.database_options = db->database_options;
4646
auto mid_ram = std::make_shared<middle_ram_t>();
4747
auto out_test = std::make_shared<output_pgsql_t>(mid_ram.get(), options);
48-
osmdata_t osmdata(mid_ram, out_test, options.projection);
48+
osmdata_t osmdata(mid_ram, out_test);
4949

5050
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
5151
options, &osmdata);

tests/test-output-multi-line-storage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int main(int argc, char *argv[]) {
5151
std::vector<std::shared_ptr<output_t> > outputs = output_t::create_outputs(middle.get(), options);
5252

5353
//let osmdata orchestrate between the middle and the outs
54-
osmdata_t osmdata(middle, outputs, options.projection);
54+
osmdata_t osmdata(middle, outputs);
5555

5656
testing::parse("tests/test_output_multi_line_storage.osm", "xml",
5757
options, &osmdata);

tests/test-output-multi-line.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int main(int argc, char *argv[]) {
4949
// This actually uses the multi-backend with C transforms, not Lua transforms. This is unusual and doesn't reflect real practice
5050
auto out_test = std::make_shared<output_multi_t>("foobar_highways", processor, columns, mid_pgsql.get(), options);
5151

52-
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
52+
osmdata_t osmdata(mid_pgsql, out_test);
5353

5454
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
5555
options, &osmdata);

tests/test-output-multi-point-multi-table.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int main(int argc, char *argv[]) {
5858
outputs.push_back(out_test);
5959
}
6060

61-
osmdata_t osmdata(mid_pgsql, outputs, options.projection);
61+
osmdata_t osmdata(mid_pgsql, outputs);
6262

6363
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
6464
options, &osmdata);

tests/test-output-multi-point.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int main(int argc, char *argv[]) {
4848

4949
auto out_test = std::make_shared<output_multi_t>("foobar_amenities", processor, columns, mid_pgsql.get(), options);
5050

51-
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
51+
osmdata_t osmdata(mid_pgsql, out_test);
5252

5353
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
5454
options, &osmdata);

0 commit comments

Comments
 (0)