forked from organicmaps/organicmaps
[generator] Use rank value to filter multiple cities and towns in World map.
Adjust search radius for duplicates to 20 km.
This commit is contained in:
parent
671dcce02a
commit
291bb9df9b
2 changed files with 3 additions and 2 deletions
|
@ -161,6 +161,7 @@ public:
|
|||
}
|
||||
|
||||
string GetName(int8_t lang = StringUtf8Multilang::DEFAULT_CODE) const;
|
||||
uint8_t GetRank() const { return m_params.rank; }
|
||||
|
||||
/// @name For diagnostic use only.
|
||||
//@{
|
||||
|
|
|
@ -271,7 +271,7 @@ class SecondPassParser : public BaseOSMParser
|
|||
m2::PointD m_pt;
|
||||
uint32_t m_type;
|
||||
|
||||
static constexpr double THRESHOLD_M = 5000.0;
|
||||
static constexpr double THRESHOLD_M = 20000.0;
|
||||
|
||||
bool IsPoint() const { return (m_ft.GetGeomType() == feature::GEOM_POINT); }
|
||||
|
||||
|
@ -300,7 +300,7 @@ class SecondPassParser : public BaseOSMParser
|
|||
|
||||
bool NeedReplace(Place const & r) const
|
||||
{
|
||||
return r.IsPoint();
|
||||
return (r.IsPoint() && (!IsPoint() || r.m_ft.GetRank() < m_ft.GetRank()));
|
||||
}
|
||||
//@}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue