diff options
author | Maxim Pimenov <m@maps.me> | 2016-01-15 14:57:38 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:16:02 +0300 |
commit | 5c9ac0e04484c80dc099d45330c317f7a83465f8 (patch) | |
tree | 274d1d14efc9b8d5c3848d6cebf907666b56a748 /indexer/ftypes_matcher.cpp | |
parent | 9e09ffcc6a3acf4182e26819cb2e76480e148fee (diff) |
[search] Added villages.
Diffstat (limited to 'indexer/ftypes_matcher.cpp')
-rw-r--r-- | indexer/ftypes_matcher.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp index 4a990d15e0..355438edad 100644 --- a/indexer/ftypes_matcher.cpp +++ b/indexer/ftypes_matcher.cpp @@ -115,8 +115,8 @@ IsRailwayStationChecker const & IsRailwayStationChecker::Instance() IsStreetChecker::IsStreetChecker() { // TODO (@y, @m, @vng): this list must be up-to-date with - // data/categories.txt, so, it worth to generate or parse it from that - // file. + // data/categories.txt, so, it's worth it to generate or parse it + // from that file. Classificator const & c = classif(); char const * arr[][2] = {{"highway", "living_street"}, {"highway", "footway"}, @@ -147,6 +147,24 @@ IsStreetChecker const & IsStreetChecker::Instance() return inst; } +IsVillageChecker::IsVillageChecker() +{ + // TODO (@y, @m, @vng): this list must be up-to-date with + // data/categories.txt, so, it's worth it to generate or parse it + // from that file. + Classificator const & c = classif(); + char const * arr[][2] = {{"place", "village"}, {"place", "hamlet"}}; + + for (auto const & p : arr) + m_types.push_back(c.GetTypeByPath({p[0], p[1]})); +} + +IsVillageChecker const & IsVillageChecker::Instance() +{ + static const IsVillageChecker inst; + return inst; +} + IsOneWayChecker::IsOneWayChecker() { Classificator const & c = classif(); |