Fix area feature emitting during World generation.

This commit is contained in:
vng 2011-05-06 18:19:17 +03:00 committed by Alex Zolotarev
parent aa437fb5c8
commit aa6a7fda5b
2 changed files with 11 additions and 6 deletions

View file

@ -11,10 +11,13 @@ public:
/// but only if they have common point
void AppendFeature(FeatureBuilder1Merger const & fb);
void SetAreaSafe()
bool SetAreaSafe()
{
if (!m_bArea)
m_bArea = true;
if (m_Geometry.size() < 3)
return false;
m_bArea = true;
return true;
}
uint32_t KeyType() const

View file

@ -40,9 +40,11 @@ private:
{
if (fbm.FirstPoint() == fbm.LastPoint())
{
fbm.SetAreaSafe();
(*m_worldBucket)(fbm);
++m_areasCounter;
if (fbm.SetAreaSafe())
{
(*m_worldBucket)(fbm);
++m_areasCounter;
}
return true;
}
else return false;