diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2016-03-03 15:56:34 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:51:07 +0300 |
commit | 4df47db708e7f82e36f28d71284184baae0a0ca3 (patch) | |
tree | 352a978dd9037b7738341fe4601ea136b848cd58 /indexer/feature_visibility.cpp | |
parent | 18e19e0ccf0ffe4c02c5240206beaadece9457d7 (diff) |
Add shuttle_train features to index.
Diffstat (limited to 'indexer/feature_visibility.cpp')
-rw-r--r-- | indexer/feature_visibility.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp index c366ed70ea..0ed396bfe6 100644 --- a/indexer/feature_visibility.cpp +++ b/indexer/feature_visibility.cpp @@ -200,6 +200,12 @@ namespace } }; + bool HasRoutingExceptionType(uint32_t t) + { + static const uint32_t s = classif().GetTypeByPath({ "route", "shuttle_train" }); + return s == t; + } + /// Add here all exception classificator types: needed for algorithms, /// but don't have drawing rules. bool TypeAlwaysExists(uint32_t t, EGeomType g = GEOM_UNDEFINED) @@ -212,6 +218,9 @@ namespace if (s1 == t) return true; + if (HasRoutingExceptionType(t)) + return true; + ftype::TruncValue(t, 1); if (s2 == t) return true; @@ -221,6 +230,16 @@ namespace } } +bool IsDrawarbleByException(FeatureBase const & f) +{ + TypesHolder const types(f); + + for (uint32_t t : types) + if (HasRoutingExceptionType(t)) + return true; + return false; +} + bool IsDrawableAny(uint32_t type) { return (TypeAlwaysExists(type) || classif().GetObject(type)->IsDrawableAny()); |