From 67b27d0d9e633d45e84f48c55e335812d306614b Mon Sep 17 00:00:00 2001 From: vng Date: Sat, 8 Oct 2011 11:32:59 +0300 Subject: [PATCH] Fix getting of cell's name and id for coastlines. --- generator/coastlines_generator.cpp | 2 +- generator/feature_builder.cpp | 6 +++--- generator/feature_builder.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/generator/coastlines_generator.cpp b/generator/coastlines_generator.cpp index 182beec5d7..08587dbd5a 100644 --- a/generator/coastlines_generator.cpp +++ b/generator/coastlines_generator.cpp @@ -198,7 +198,7 @@ bool CoastlineFeaturesGenerator::GetFeature(CellIdT const & cell, FeatureBuilder return false; // assign feature - fb.SetCoastCell(cell.ToInt64(CellIdT::DEPTH_LEVELS)); + fb.SetCoastCell(cell.ToInt64(m_highLevel + 1), cell.ToString()); doDiff.AssignGeometry(fb); fb.SetArea(); diff --git a/generator/feature_builder.cpp b/generator/feature_builder.cpp index bdc891d1fa..b05f0f26fc 100644 --- a/generator/feature_builder.cpp +++ b/generator/feature_builder.cpp @@ -337,12 +337,12 @@ int FeatureBuilder1::GetMinFeatureDrawScale() const return (minScale == -1 ? 1000 : minScale); } -void FeatureBuilder1::SetCoastCell(int64_t cell) +void FeatureBuilder1::SetCoastCell(int64_t iCell, string const & strCell) { - m_coastCell = cell; + m_coastCell = iCell; FeatureParams params; - params.name.AddString(0, strings::to_string(cell)); + params.name.AddString(0, strCell); SetParams(params); } diff --git a/generator/feature_builder.hpp b/generator/feature_builder.hpp index d3e2be106f..05754ad91c 100644 --- a/generator/feature_builder.hpp +++ b/generator/feature_builder.hpp @@ -123,7 +123,7 @@ public: int GetMinFeatureDrawScale() const; - void SetCoastCell(int64_t cell); + void SetCoastCell(int64_t iCell, string const & strCell); inline bool GetCoastCell(int64_t & cell) const { if (m_coastCell != -1)