mirror of
https://github.com/osm2pgsql-dev/osm2pgsql.git
synced 2025-08-10 01:35:36 +00:00
osmdata: remove unused projection member
This commit is contained in:
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
//let osmdata orchestrate between the middle and the outs
|
||||
osmdata_t osmdata(middle, outputs, options.projection);
|
||||
osmdata_t osmdata(middle, outputs);
|
||||
|
||||
fprintf(stderr, "Using projection SRS %d (%s)\n",
|
||||
options.projection->target_srs(),
|
||||
|
14
osmdata.cpp
14
osmdata.cpp
@ -14,18 +14,16 @@
|
||||
#include "output.hpp"
|
||||
|
||||
osmdata_t::osmdata_t(std::shared_ptr<middle_t> mid_,
|
||||
std::shared_ptr<output_t> const &out_,
|
||||
std::shared_ptr<reprojection> proj)
|
||||
: mid(mid_), projection(proj)
|
||||
std::shared_ptr<output_t> const &out_)
|
||||
: mid(mid_)
|
||||
{
|
||||
outs.push_back(out_);
|
||||
with_extra = outs[0]->get_options()->extra_attributes;
|
||||
}
|
||||
|
||||
osmdata_t::osmdata_t(std::shared_ptr<middle_t> mid_,
|
||||
std::vector<std::shared_ptr<output_t> > const &outs_,
|
||||
std::shared_ptr<reprojection> proj)
|
||||
: mid(mid_), outs(outs_), projection(proj)
|
||||
std::vector<std::shared_ptr<output_t>> const &outs_)
|
||||
: mid(mid_), outs(outs_)
|
||||
{
|
||||
if (outs.empty()) {
|
||||
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_,
|
||||
with_extra = outs[0]->get_options()->extra_attributes;
|
||||
}
|
||||
|
||||
osmdata_t::~osmdata_t()
|
||||
{
|
||||
}
|
||||
|
||||
int osmdata_t::node_add(osmium::Node const &node)
|
||||
{
|
||||
mid->nodes_set(node);
|
||||
|
@ -18,12 +18,9 @@ class osmdata_t
|
||||
{
|
||||
public:
|
||||
osmdata_t(std::shared_ptr<middle_t> mid_,
|
||||
std::shared_ptr<output_t> const &out_,
|
||||
std::shared_ptr<reprojection> proj);
|
||||
std::shared_ptr<output_t> const &out_);
|
||||
osmdata_t(std::shared_ptr<middle_t> mid_,
|
||||
std::vector<std::shared_ptr<output_t> > const &outs_,
|
||||
std::shared_ptr<reprojection> proj);
|
||||
~osmdata_t();
|
||||
std::vector<std::shared_ptr<output_t>> const &outs_);
|
||||
|
||||
void start();
|
||||
void type_changed(osmium::item_type new_type);
|
||||
@ -44,7 +41,6 @@ public:
|
||||
private:
|
||||
std::shared_ptr<middle_t> mid;
|
||||
std::vector<std::shared_ptr<output_t> > outs;
|
||||
std::shared_ptr<reprojection> projection;
|
||||
bool with_extra;
|
||||
};
|
||||
|
||||
|
@ -6,6 +6,6 @@ BASEDIR=`pwd`
|
||||
|
||||
TBLDIR=${BASEDIR}/osm2pgsql-test-tablespace
|
||||
|
||||
if find $TBLDIR -maxdepth 1 -mindepth 1 -type d -name 'PG*'; then
|
||||
rm -r $TBLDIR/PG*
|
||||
if [ -d "$TBLDIR" ]; then
|
||||
find $TBLDIR -maxdepth 1 -mindepth 1 -type d -name 'PG*' -delete
|
||||
fi
|
||||
|
@ -55,7 +55,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/hstore-match-only.osm", "xml",
|
||||
options, &osmdata);
|
||||
|
@ -45,7 +45,7 @@ static void check_tables(pg::tempdb *db, options_t &options,
|
||||
options.database_options = db->database_options;
|
||||
auto mid_ram = std::make_shared<middle_ram_t>();
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_ram.get(), options);
|
||||
osmdata_t osmdata(mid_ram, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_ram, out_test);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
|
@ -51,7 +51,7 @@ int main(int argc, char *argv[]) {
|
||||
std::vector<std::shared_ptr<output_t> > outputs = output_t::create_outputs(middle.get(), options);
|
||||
|
||||
//let osmdata orchestrate between the middle and the outs
|
||||
osmdata_t osmdata(middle, outputs, options.projection);
|
||||
osmdata_t osmdata(middle, outputs);
|
||||
|
||||
testing::parse("tests/test_output_multi_line_storage.osm", "xml",
|
||||
options, &osmdata);
|
||||
|
@ -49,7 +49,7 @@ int main(int argc, char *argv[]) {
|
||||
// This actually uses the multi-backend with C transforms, not Lua transforms. This is unusual and doesn't reflect real practice
|
||||
auto out_test = std::make_shared<output_multi_t>("foobar_highways", processor, columns, mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
|
@ -58,7 +58,7 @@ int main(int argc, char *argv[]) {
|
||||
outputs.push_back(out_test);
|
||||
}
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, outputs, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, outputs);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
|
@ -48,7 +48,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
auto out_test = std::make_shared<output_multi_t>("foobar_amenities", processor, columns, mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
|
@ -30,7 +30,7 @@ void run_osm2pgsql(options_t &options) {
|
||||
std::vector<std::shared_ptr<output_t> > outputs = output_t::create_outputs(middle.get(), options);
|
||||
|
||||
//let osmdata orchestrate between the middle and the outs
|
||||
osmdata_t osmdata(middle, outputs, options.projection);
|
||||
osmdata_t osmdata(middle, outputs);
|
||||
|
||||
testing::parse("tests/test_output_multi_poly_trivial.osm", "xml",
|
||||
options, &osmdata);
|
||||
|
@ -48,7 +48,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
auto out_test = std::make_shared<output_multi_t>("foobar_buildings", processor, columns, mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
|
@ -51,7 +51,7 @@ int main(int argc, char *argv[]) {
|
||||
std::vector<std::shared_ptr<output_t> > outputs = output_t::create_outputs(middle.get(), options);
|
||||
|
||||
//let osmdata orchestrate between the middle and the outs
|
||||
osmdata_t osmdata(middle, outputs, options.projection);
|
||||
osmdata_t osmdata(middle, outputs);
|
||||
|
||||
testing::parse("tests/test_output_multi_tags.osm", "xml",
|
||||
options, &osmdata);
|
||||
|
@ -75,7 +75,7 @@ void test_area_base(bool latlon, bool reproj, double expect_area_poly, double ex
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
testing::parse("tests/test_output_pgsql_area.osm", "xml",
|
||||
options, &osmdata);
|
||||
|
||||
|
@ -77,7 +77,7 @@ void test_other_output_schema() {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/test_output_pgsql_z_order.osm", "xml",
|
||||
options, &osmdata);
|
||||
|
@ -78,7 +78,7 @@ void test_regression_simple() {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
|
@ -73,7 +73,7 @@ void test_z_order() {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/test_output_pgsql_validgeom.osm", "xml",
|
||||
options, &osmdata);
|
||||
|
@ -73,7 +73,7 @@ void test_z_order() {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/test_output_pgsql_z_order.osm", "xml",
|
||||
options, &osmdata);
|
||||
|
@ -76,7 +76,7 @@ void test_regression_simple() {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
@ -128,7 +128,7 @@ void test_latlong() {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
@ -181,7 +181,7 @@ void test_area_way_simple() {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_pgsql.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_test);
|
||||
|
||||
testing::parse("tests/test_output_pgsql_way_area.osm", "xml",
|
||||
options, &osmdata);
|
||||
@ -220,7 +220,7 @@ void test_route_rel() {
|
||||
|
||||
auto out_test = std::make_shared<output_pgsql_t>(mid_ram.get(), options);
|
||||
|
||||
osmdata_t osmdata(mid_ram, out_test, options.projection);
|
||||
osmdata_t osmdata(mid_ram, out_test);
|
||||
|
||||
testing::parse("tests/test_output_pgsql_route_rel.osm", "xml",
|
||||
options, &osmdata);
|
||||
@ -265,7 +265,7 @@ void test_clone() {
|
||||
//std::shared_ptr<middle_t> mid_clone = mid_pgsql->get_instance();
|
||||
std::shared_ptr<output_t> out_clone = out_test.clone(mid_pgsql.get());
|
||||
|
||||
osmdata_t osmdata(mid_pgsql, out_clone, options.projection);
|
||||
osmdata_t osmdata(mid_pgsql, out_clone);
|
||||
|
||||
testing::parse("tests/liechtenstein-2013-08-03.osm.pbf", "pbf",
|
||||
options, &osmdata);
|
||||
|
@ -107,7 +107,7 @@ int main() {
|
||||
options.projection = projection;
|
||||
|
||||
auto out_test = std::make_shared<test_output_t>(options);
|
||||
osmdata_t osmdata(std::make_shared<dummy_slim_middle_t>(), out_test, options.projection);
|
||||
osmdata_t osmdata(std::make_shared<dummy_slim_middle_t>(), out_test);
|
||||
|
||||
boost::optional<std::string> bbox;
|
||||
parse_osmium_t parser(bbox, true, &osmdata);
|
||||
|
@ -95,8 +95,7 @@ int main(int argc, char *argv[])
|
||||
options.extra_attributes = true;
|
||||
|
||||
auto out_test = std::make_shared<test_output_t>(options);
|
||||
osmdata_t osmdata(std::make_shared<dummy_middle_t>(), out_test,
|
||||
options.projection);
|
||||
osmdata_t osmdata(std::make_shared<dummy_middle_t>(), out_test);
|
||||
|
||||
boost::optional<std::string> bbox;
|
||||
parse_osmium_t parser(bbox, false, &osmdata);
|
||||
|
@ -86,7 +86,7 @@ int main(int argc, char *argv[]) {
|
||||
options.projection = projection;
|
||||
|
||||
auto out_test = std::make_shared<test_output_t>(options);
|
||||
osmdata_t osmdata(std::make_shared<dummy_middle_t>(), out_test, options.projection);
|
||||
osmdata_t osmdata(std::make_shared<dummy_middle_t>(), out_test);
|
||||
|
||||
boost::optional<std::string> bbox;
|
||||
parse_osmium_t parser(bbox, false, &osmdata);
|
||||
|
Reference in New Issue
Block a user