Process empty geometry in coastlines generation (FeatureBuilder1).

This commit is contained in:
vng 2011-09-08 16:14:48 +03:00 committed by Alex Zolotarev
parent bd75e193c0
commit c2b77c36cf
2 changed files with 7 additions and 5 deletions

View file

@ -206,5 +206,6 @@ bool CoastlineFeaturesGenerator::GetFeature(size_t i, FeatureBuilder1 & fb)
fb.AddType(m_coastType);
fb.SetCoastCell(i);
return true;
// should present any geometry
return (fb.GetPointsCount() >= 3);
}

View file

@ -309,10 +309,11 @@ public:
for (size_t i = 0; i < count; ++i)
{
FeatureBuilder1 fb;
m_coasts->GetFeature(i, fb);
(*m_coastsHolder)(fb);
m_countries(fb);
if (m_coasts->GetFeature(i, fb))
{
(*m_coastsHolder)(fb);
m_countries(fb);
}
}
}
}