Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2011-10-12 16:54:30 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:25:53 +0300
commiteddeb5176f2ff707ced4cea336b29a49bc319be5 (patch)
treea5e00541190a0cc0b517b857bf8aa55aef51b88a /indexer/index.hpp
parentc8325d4b968c95ae75f160f7b294903667bd5cd8 (diff)
Prepare for drawing WorldCoasts in [0-17] scales:
- Use DataHeader::GetLastScale for covering depth calculation - Pass correct scale to ForEachInIntervalAndScale for scale >= 10.
Diffstat (limited to 'indexer/index.hpp')
-rw-r--r--indexer/index.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indexer/index.hpp b/indexer/index.hpp
index cf49839b2c..7d65749721 100644
--- a/indexer/index.hpp
+++ b/indexer/index.hpp
@@ -108,8 +108,14 @@ private:
{
feature::DataHeader const & header = pValue->GetHeader();
- // prepare needed covering
- covering::IntervalsT const & interval = cov.Get(header.GetScaleRange());
+ // Prepare needed covering.
+
+ // In case of WorldCoasts we should pass correct scale in ForEachInIntervalAndScale.
+ int const lastScale = header.GetLastScale();
+ if (scale > lastScale) scale = lastScale;
+
+ // Use last coding scale for covering (see index_builder.cpp).
+ covering::IntervalsT const & interval = cov.Get(lastScale);
// prepare features reading
FeaturesVector fv(pValue->m_cont, header);