diff options
author | vng <viktor.govako@gmail.com> | 2016-01-28 16:39:40 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:16:55 +0300 |
commit | d73fc8b5e49538db4b6f054c19f0979161cbda59 (patch) | |
tree | 081c0ac1555bb31e265917fa2881600a3abfe805 /search/reverse_geocoder.hpp | |
parent | 41cef46ddc22d5f5a6465d9bfec8cb78b30d2ae3 (diff) |
[search] Limited ReverseGeocoder with single MWM while matching streets.
Diffstat (limited to 'search/reverse_geocoder.hpp')
-rw-r--r-- | search/reverse_geocoder.hpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/search/reverse_geocoder.hpp b/search/reverse_geocoder.hpp index 656620ba39..18229f62c9 100644 --- a/search/reverse_geocoder.hpp +++ b/search/reverse_geocoder.hpp @@ -33,6 +33,7 @@ class ReverseGeocoder }; public: + /// All "Nearby" functions work in this lookup radius. static double const kLookupRadiusM; explicit ReverseGeocoder(Index const & index); @@ -65,17 +66,22 @@ public: double GetDistance() const { return m_building.m_distanceMeters; } }; - void GetNearbyStreets(m2::PointD const & center, vector<Street> & streets) const; + /// @return Sorted by distance streets vector for the specified MwmId. + //@{ + void GetNearbyStreets(MwmSet::MwmId id, m2::PointD const & center, + vector<Street> & streets) const; + void GetNearbyStreets(FeatureType & ft, vector<Street> & streets) const; + //@} - void GetNearbyAddress(m2::PointD const & center, Address & addr) const; - - /// @returns street segments (can be duplicate names) sorted by distance to feature's center. - /// uint32_t, if less than vector.size(), contains index of exact feature's street specified in OSM data. + /// @todo Leave const reference for now to support client's legacy code. + /// It's better to use honest non-const reference when feature can be modified in any way. pair<vector<Street>, uint32_t> GetNearbyFeatureStreets(FeatureType const & feature) const; - void GetNearbyBuildings(m2::PointD const & center, vector<Building> & buildings) const; + /// @return The nearest exact address where building has house number and valid street match. + void GetNearbyAddress(m2::PointD const & center, Address & addr) const; - void GetNearbyBuildings(m2::PointD const & center, double radiusM, vector<Building> & buildings) const; + /// @return Sorted by distance houses vector with valid house number. + void GetNearbyBuildings(m2::PointD const & center, vector<Building> & buildings) const; private: static m2::RectD GetLookupRect(m2::PointD const & center, double radiusM); |