diff options
author | vng <viktor.govako@gmail.com> | 2015-10-14 18:27:45 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:02:25 +0300 |
commit | 865f87b179018084b1803b35fab20c3fe5c9827e (patch) | |
tree | 30bcf9d385e18674c09b4ef8645e79f571c7258e /indexer/rank_table.cpp | |
parent | 7fcbddfac81b3f785bf985a7be5cf7e471a66122 (diff) |
Calculate rank only for point features.
Diffstat (limited to 'indexer/rank_table.cpp')
-rw-r--r-- | indexer/rank_table.cpp | 7 |
1 files 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 |