diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2019-01-21 13:56:25 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <bykoianko@gmail.com> | 2019-01-21 16:13:21 +0300 |
commit | 36ef7c0694810dee619fb7f06c832a147159d4e3 (patch) | |
tree | e9aa543d8061832f2f96a84dc2f4bced97bf401d | |
parent | bcea52c397ec14c5c51fa8e65e4a92c50556db25 (diff) |
[indexer] Do not force emit junction-roundabout feature type.
-rw-r--r-- | indexer/feature_visibility.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp index 52ebe28403..7bb414167a 100644 --- a/indexer/feature_visibility.cpp +++ b/indexer/feature_visibility.cpp @@ -228,31 +228,15 @@ namespace if (!classif().IsTypeValid(type)) return false; - static uint32_t const roundabout = classif().GetTypeByPath({"junction", "roundabout"}); static uint32_t const internet = classif().GetTypeByPath({"internet_access"}); static uint32_t const sponsored = classif().GetTypeByPath({"sponsored"}); - // Reserved for custom event processing, i.e. fc2018. - // static uint32_t const event = classif().GetTypeByPath({"event" }); - if (g == GEOM_LINE || g == GEOM_UNDEFINED) - { - if (roundabout == type) - return true; - - if (HasRoutingExceptionType(type)) - return true; - } + if ((g == GEOM_LINE || g == GEOM_UNDEFINED) && HasRoutingExceptionType(type)) + return true; ftype::TruncValue(type, 1); - if (g != GEOM_LINE) - { - if (sponsored == type || internet == type) - return true; - - // Reserved for custom event processing, i.e. fc2018. - //if (event == type) - // return true; - } + if (g != GEOM_LINE && (sponsored == type || internet == type)) + return true; return false; } @@ -268,13 +252,19 @@ namespace return true; static uint32_t const hwtag = classif().GetTypeByPath({"hwtag"}); + static uint32_t const roundabout = classif().GetTypeByPath({"junction", "roundabout"}); static uint32_t const psurface = classif().GetTypeByPath({"psurface"}); static uint32_t const wheelchair = classif().GetTypeByPath({"wheelchair"}); static uint32_t const cuisine = classif().GetTypeByPath({"cuisine"}); + // Reserved for custom event processing, e.g. fc2018. + // static uint32_t const event = classif().GetTypeByPath({"event" }); // Caching type length to exclude generic [wheelchair]. uint8_t const typeLength = ftype::GetLevel(type); + if ((g == GEOM_LINE || g == GEOM_UNDEFINED) && type == roundabout) + return true; + ftype::TruncValue(type, 1); if (g == GEOM_LINE || g == GEOM_UNDEFINED) { @@ -288,6 +278,10 @@ namespace if (cuisine == type) return true; + // Reserved for custom event processing, i.e. fc2018. + // if (event == type) + // return true; + return false; } } // namespace |