diff --git a/generator/feature_sorter.cpp b/generator/feature_sorter.cpp index b5997d1566..5d555b3d52 100644 --- a/generator/feature_sorter.cpp +++ b/generator/feature_sorter.cpp @@ -427,7 +427,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)) @@ -436,9 +437,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);