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>2014-12-26 11:36:33 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:36:00 +0300
commita4718a235ea5e7e917ad307241c1753a3b0ea5c2 (patch)
treeae9eb94e9eec77ddd3313c239d92865fcf3bfef1 /search/locality_finder.cpp
parent825fcd4f55fd41b006abc9de9c2a7db1e8852224 (diff)
Replace DistanceOnEarth fn call with more convenient one.
Diffstat (limited to 'search/locality_finder.cpp')
-rw-r--r--search/locality_finder.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/search/locality_finder.cpp b/search/locality_finder.cpp
index d64c2fa97b..8f2321b9b0 100644
--- a/search/locality_finder.cpp
+++ b/search/locality_finder.cpp
@@ -3,8 +3,6 @@
#include "../indexer/ftypes_matcher.hpp"
#include "../indexer/features_vector.hpp"
-#include "../geometry/distance_on_sphere.hpp"
-
namespace search
{
@@ -77,12 +75,7 @@ public:
void operator() (LocalityItem const & item)
{
- m2::PointD const c = item.m_rect.Center();
- double const d = ms::DistanceOnEarth(MercatorBounds::YToLat(c.y),
- MercatorBounds::XToLon(c.x),
- MercatorBounds::YToLat(m_point.y),
- MercatorBounds::XToLon(m_point.x));
-
+ double const d = MercatorBounds::DistanceOnEarth(item.m_rect.Center(), m_point);
double const value = ftypes::GetPopulationByRadius(d) / static_cast<double>(item.m_population);
if (value < m_bestValue)
{