diff options
author | Jochen Topf <jochen@topf.org> | 2014-05-17 14:51:02 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2014-05-17 14:51:02 +0200 |
commit | 1da1bbf121104c29fc3c9265d6f4156c48d688d5 (patch) | |
tree | 562d1826826d7f67d7fa83d57401753395d2eb83 | |
parent | 482c4a8bf0d7e9cb2f1f3285e49b3fcea59d9544 (diff) | |
download | taginfo-1da1bbf121104c29fc3c9265d6f4156c48d688d5.tar taginfo-1da1bbf121104c29fc3c9265d6f4156c48d688d5.tar.gz |
Make compilation not conditional on TAGSTATS_GEODISTRIBUTION_FOR_WAYS
-rw-r--r-- | tagstats/tagstats.cpp | 4 | ||||
-rw-r--r-- | tagstats/tagstats_handler.hpp | 17 |
2 files changed, 3 insertions, 18 deletions
diff --git a/tagstats/tagstats.cpp b/tagstats/tagstats.cpp index f5c349a..2ebae5e 100644 --- a/tagstats/tagstats.cpp +++ b/tagstats/tagstats.cpp @@ -36,10 +36,8 @@ typedef TAGSTATS_GEODISTRIBUTION_INT rough_position_t; // Set BYID in Makefile to SparseTable, MmapFile, or MmapAnon -#ifdef TAGSTATS_GEODISTRIBUTION_FOR_WAYS -# include TAGSTATS_GEODISTRIBUTION_INCLUDE +#include TAGSTATS_GEODISTRIBUTION_INCLUDE typedef Osmium::Storage::ById::TAGSTATS_GEODISTRIBUTION_FOR_WAYS<rough_position_t> storage_t; -#endif // TAGSTATS_GEODISTRIBUTION_FOR_WAYS #include "geodistribution.hpp" diff --git a/tagstats/tagstats_handler.hpp b/tagstats/tagstats_handler.hpp index 022a4bb..846d86b 100644 --- a/tagstats/tagstats_handler.hpp +++ b/tagstats/tagstats_handler.hpp @@ -456,11 +456,7 @@ class TagStatsHandler : public Osmium::Handler::Base { gd_it->second->add_coordinate(location); } } -#ifdef TAGSTATS_GEODISTRIBUTION_FOR_WAYS else if (object.type() == WAY) { - // This will only add the coordinate of the first node in a way to the - // distribution. We'll see how this goes, maybe we need to store the - // coordinates of all nodes? const Osmium::OSM::WayNodeList& wnl = static_cast<const Osmium::OSM::Way&>(object).nodes(); if (!wnl.empty()) { key_value_geodistribution_hash_map_t::iterator gd_it = m_key_value_geodistribution.find(keyvalue); @@ -473,7 +469,6 @@ class TagStatsHandler : public Osmium::Handler::Base { } } } -#endif // TAGSTATS_GEODISTRIBUTION_FOR_WAYS } _update_key_combination_hash(object.type(), begin, end); @@ -484,9 +479,7 @@ class TagStatsHandler : public Osmium::Handler::Base { MapToInt<rough_position_t> m_map_to_int; -#ifdef TAGSTATS_GEODISTRIBUTION_FOR_WAYS storage_t m_storage; -#endif public: @@ -497,10 +490,8 @@ public: m_string_store(string_store_size), m_database(database), statistics_handler(database), - m_map_to_int(map_to_int) -#ifdef TAGSTATS_GEODISTRIBUTION_FOR_WAYS - , m_storage() -#endif + m_map_to_int(map_to_int), + m_storage() { if (!selection_database_name.empty()) { Sqlite::Database sdb(selection_database_name.c_str(), SQLITE_OPEN_READONLY); @@ -540,9 +531,7 @@ public: void node(const shared_ptr<Osmium::OSM::Node const>& node) { statistics_handler.node(node); collect_tag_stats(*node); -#ifdef TAGSTATS_GEODISTRIBUTION_FOR_WAYS m_storage.set(node->id(), m_map_to_int(node->position())); -#endif } void way(const shared_ptr<Osmium::OSM::Way const>& way) { @@ -599,10 +588,8 @@ public: void after_ways() { _timer_info("processing ways"); -#ifdef TAGSTATS_GEODISTRIBUTION_FOR_WAYS _print_and_clear_key_distribution_images(false); _print_and_clear_tag_distribution_images(false); -#endif _print_memory_usage(); } |