[tmp] Disable line geometry optimization in generator tool

This commit is contained in:
Denis Koronchik 2014-09-05 18:06:08 +03:00 committed by Alex Zolotarev
parent a7bf5cf36f
commit 9ac73c62e9

View file

@ -436,7 +436,8 @@ namespace feature
}
*/
for (int i = m_header.GetScalesCount()-1; i >= 0; --i)
int const scalesStart = m_header.GetScalesCount() - 1;
for (int i = scalesStart; i >= 0; --i)
{
int const level = m_header.GetScale(i);
if (fb.IsDrawableInRange(i > 0 ? m_header.GetScale(i-1) + 1 : 0, level))
@ -445,9 +446,14 @@ namespace feature
bool const isCoast = fb.GetCoastCell(dummy);
m2::RectD const rect = fb.GetLimitRect();
// simplify and serialize geometry
// Simplify and serialize geometry.
points_t points;
SimplifyPoints(holder.GetSourcePoints(), points, level, isCoast, rect);
// Do not change linear geometry for the upper scale.
if (isLine && i == scalesStart)
points = holder.GetSourcePoints();
else
SimplifyPoints(holder.GetSourcePoints(), points, level, isCoast, rect);
if (isLine)
holder.AddPoints(points, i);