forked from organicmaps/organicmaps
Points additional filtrations (must be removed later!)
This commit is contained in:
parent
d588f9bb2b
commit
0c68474f3e
3 changed files with 17 additions and 2 deletions
|
@ -181,7 +181,20 @@ ApplyLineFeature::ApplyLineFeature(EngineContext & context, TileKey tileKey, Fea
|
|||
|
||||
void ApplyLineFeature::operator ()(CoordPointT const & point)
|
||||
{
|
||||
m_path.push_back(m2::PointF(point.first, point.second));
|
||||
m2::PointF inputPt(point.first, point.second);
|
||||
|
||||
/// TODO remove this check when fix generator.
|
||||
/// Now we have line objects with zero length segments
|
||||
if (m_path.empty())
|
||||
m_path.push_back(inputPt);
|
||||
else
|
||||
if (!(inputPt - m_path.back()).IsAlmostZero())
|
||||
m_path.push_back(inputPt);
|
||||
}
|
||||
|
||||
bool ApplyLineFeature::HasGeometry() const
|
||||
{
|
||||
return m_path.size() > 1;
|
||||
}
|
||||
|
||||
void ApplyLineFeature::ProcessRule(Stylist::rule_wrapper_t const & rule)
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
FeatureID const & id);
|
||||
|
||||
void operator ()(CoordPointT const & point);
|
||||
bool HasGeometry() const;
|
||||
void ProcessRule(Stylist::rule_wrapper_t const & rule);
|
||||
|
||||
private:
|
||||
|
|
|
@ -62,7 +62,8 @@ void RuleDrawer::operator()(FeatureType const & f)
|
|||
ApplyLineFeature apply(m_context, m_tileKey, f.GetID());
|
||||
f.ForEachPointRef(apply, m_tileKey.m_zoomLevel);
|
||||
|
||||
s.ForEachRule(bind(&ApplyLineFeature::ProcessRule, &apply, _1));
|
||||
if (apply.HasGeometry())
|
||||
s.ForEachRule(bind(&ApplyLineFeature::ProcessRule, &apply, _1));
|
||||
//apply.Finish();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue