diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2015-09-04 14:18:19 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:05:49 +0300 |
commit | fcd1074999ade74327b31ee95f870d4573bf588b (patch) | |
tree | edb554c3d389200e0bb973cf1edfaa9fade1edec /generator | |
parent | 3c153e5135042fa97f9fb584b4523d0b036f6a8c (diff) |
Skip some tag before process them
Diffstat (limited to 'generator')
-rw-r--r-- | generator/osm_element.cpp | 36 | ||||
-rw-r--r-- | generator/osm_element.hpp | 2 |
2 files changed, 37 insertions, 1 deletions
diff --git a/generator/osm_element.cpp b/generator/osm_element.cpp index 28a0b5629d..a04f4bb7d3 100644 --- a/generator/osm_element.cpp +++ b/generator/osm_element.cpp @@ -29,6 +29,42 @@ string DebugPrint(OsmElement::EntityType e) } } +#define SKIP_KEY(key) if (strncmp(k.data(), key, sizeof(key)-1) == 0) return; + +void OsmElement::AddTag(string const & k, string const & v) +{ + // OSM technical info tags + SKIP_KEY("created_by"); + SKIP_KEY("source"); + SKIP_KEY("odbl"); + SKIP_KEY("note"); + SKIP_KEY("fixme"); + SKIP_KEY("iemv"); + + // Skip tags for speedup, now we don't use it + SKIP_KEY("not:"); + SKIP_KEY("seamark"); // http://wiki.openstreetmap.org/wiki/OpenSeaMap/Seamark_Tag_Values + SKIP_KEY("artist_name"); + SKIP_KEY("historic"); // http://wiki.openstreetmap.org/wiki/Historic + SKIP_KEY("whitewater"); // http://wiki.openstreetmap.org/wiki/Whitewater_sports + + + // In future we can use this tags for improve our search + SKIP_KEY("old_name"); + SKIP_KEY("alt_name"); + SKIP_KEY("nat_name"); + SKIP_KEY("reg_name"); + SKIP_KEY("loc_name"); + SKIP_KEY("lock_name"); + SKIP_KEY("local_name"); + SKIP_KEY("short_name"); + SKIP_KEY("official_name"); + + + m_tags.emplace_back(k, v); +} + + string OsmElement::ToString(string const & shift) const { stringstream ss; diff --git a/generator/osm_element.hpp b/generator/osm_element.hpp index 3cc7e74062..20799d90be 100644 --- a/generator/osm_element.hpp +++ b/generator/osm_element.hpp @@ -123,12 +123,12 @@ struct OsmElement ); } - void AddTag(string const & k, string const & v) { m_tags.emplace_back(k, v); } void AddNd(uint64_t ref) { m_nds.emplace_back(ref); } void AddMember(uint64_t ref, EntityType type, string const & role) { m_members.emplace_back(ref, type, role); } + void AddTag(string const & k, string const & v); }; string DebugPrint(OsmElement const & e); |