From 865f87b179018084b1803b35fab20c3fe5c9827e Mon Sep 17 00:00:00 2001 From: vng Date: Wed, 14 Oct 2015 18:27:45 +0300 Subject: [PATCH] Calculate rank only for point features. --- indexer/rank_table.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indexer/rank_table.cpp b/indexer/rank_table.cpp index 7319d17631..471af3c98b 100644 --- a/indexer/rank_table.cpp +++ b/indexer/rank_table.cpp @@ -247,8 +247,11 @@ uint8_t CalcSearchRank(FeatureType const & ft) if (types.Empty()) return 0; - m2::PointD const center = feature::GetCenter(ft); - return feature::GetSearchRank(types, center, ft.GetPopulation()); + // Rank (and population) is used for point features only at this moment. + if (ft.GetFeatureType() == feature::GEOM_POINT) + return feature::GetSearchRank(types, ft.GetCenter(), ft.GetPopulation()); + else + return 0; } // Creates rank table if it does not exists in |rcont| or has wrong