From 12d437aa046a50bf3b5bb00b51f712e2a181d39c Mon Sep 17 00:00:00 2001 From: Lev Dragunov Date: Mon, 21 Mar 2016 18:53:51 +0300 Subject: [PATCH 1/2] Metro and distinct names filtration fix. --- indexer/displacement_manager.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indexer/displacement_manager.hpp b/indexer/displacement_manager.hpp index b2e20bf5ae..8384af89a4 100644 --- a/indexer/displacement_manager.hpp +++ b/indexer/displacement_manager.hpp @@ -20,6 +20,8 @@ namespace { double constexpr kPOIDisplacementRadiusPixels = 80.; +size_t constexpr kMaximumIgnoredZoom = 12; + // Displacement radius in pixels * half of the world in degrees / meaned graphics tile size. // So average displacement radius will be: this / tiles in row count. double constexpr kPOIDisplacementRadiusMultiplier = kPOIDisplacementRadiusPixels * 180. / 512.; @@ -122,8 +124,8 @@ public: for (auto const & node : m_storage) { uint32_t scale = node.m_minScale; - // Do not filter high level objects. - if (scale <= scales::GetUpperWorldScale()) + // Do not filter high level objects. Including metro and country names. + if (scale <= kMaximumIgnoredZoom) { AddNodeToSorter(node,scale); acceptedNodes.Add(node); From 1a0cbeaafc2847bf73eed6bfc6060fa7195ac674 Mon Sep 17 00:00:00 2001 From: Lev Dragunov Date: Wed, 23 Mar 2016 15:28:19 +0300 Subject: [PATCH 2/2] Review fixes. --- indexer/displacement_manager.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/indexer/displacement_manager.hpp b/indexer/displacement_manager.hpp index 8384af89a4..3520c3c3c2 100644 --- a/indexer/displacement_manager.hpp +++ b/indexer/displacement_manager.hpp @@ -1,6 +1,7 @@ #pragma once #include "indexer/cell_id.hpp" +#include "indexer/classificator.hpp" #include "indexer/drawing_rules.hpp" #include "indexer/feature_data.hpp" #include "indexer/feature_visibility.hpp" @@ -20,8 +21,6 @@ namespace { double constexpr kPOIDisplacementRadiusPixels = 80.; -size_t constexpr kMaximumIgnoredZoom = 12; - // Displacement radius in pixels * half of the world in degrees / meaned graphics tile size. // So average displacement radius will be: this / tiles in row count. double constexpr kPOIDisplacementRadiusMultiplier = kPOIDisplacementRadiusPixels * 180. / 512.; @@ -125,7 +124,10 @@ public: { uint32_t scale = node.m_minScale; // Do not filter high level objects. Including metro and country names. - if (scale <= kMaximumIgnoredZoom) + static size_t const maximumIgnoredZoom = feature::GetDrawableScaleRange( + classif().GetTypeByPath({"railway", "station", "subway"})).first; + + if (scale <= maximumIgnoredZoom) { AddNodeToSorter(node,scale); acceptedNodes.Add(node);