Replaced ReverseGeocoder::GetNearbyStreets(FeatureType) calls to avoid collision with GetNearbyFeatureStreets(FeatureType).

This commit is contained in:
Alex Zolotarev 2016-01-13 14:38:20 +03:00 committed by Sergey Yershov
parent b8f3547282
commit dbe89bdae1
4 changed files with 4 additions and 11 deletions

View file

@ -341,7 +341,7 @@ void BuildAddressTable(FilesContainerR & container, Writer & writer)
using TStreet = search::ReverseGeocoder::Street;
vector<TStreet> streets;
rgc.GetNearbyStreets(ft, streets);
rgc.GetNearbyStreets(feature::GetCenter(ft), streets);
streetIndex = rgc.GetMatchedStreetIndex(street, streets);
if (streetIndex < streets.size())

View file

@ -26,11 +26,6 @@ double const ReverseGeocoder::kLookupRadiusM = 500.0;
ReverseGeocoder::ReverseGeocoder(Index const & index) : m_index(index) {}
void ReverseGeocoder::GetNearbyStreets(FeatureType const & addrFt, vector<Street> & streets) const
{
GetNearbyStreets(feature::GetCenter(addrFt), streets);
}
void ReverseGeocoder::GetNearbyStreets(m2::PointD const & center, vector<Street> & streets) const
{
m2::RectD const rect = GetLookupRect(center, kLookupRadiusM);

View file

@ -53,8 +53,6 @@ public:
}
};
void GetNearbyStreets(FeatureType const & addrFt, vector<Street> & streets) const;
static size_t GetMatchedStreetIndex(string const & keyName, vector<Street> const & streets);
struct Address
@ -66,6 +64,8 @@ public:
string GetStreetName() const { return m_street.m_name; }
};
void GetNearbyStreets(m2::PointD const & center, 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.
@ -78,8 +78,6 @@ public:
private:
static m2::RectD GetLookupRect(m2::PointD const & center, double radiusM);
void GetNearbyStreets(m2::PointD const & center, vector<Street> & streets) const;
};
} // namespace search

View file

@ -87,7 +87,7 @@ vector<ReverseGeocoder::Street> const & FeaturesLayerMatcher::GetNearbyStreetsIm
uint32_t featureId, FeatureType & feature)
{
auto & streets = m_nearbyStreetsCache[featureId];
m_reverseGeocoder.GetNearbyStreets(feature, streets);
m_reverseGeocoder.GetNearbyStreets(feature::GetCenter(feature), streets);
return streets;
}
} // namespace v2