From 6c7afadd95d4250d37b42756719093acefecd56a Mon Sep 17 00:00:00 2001 From: vng Date: Mon, 17 Oct 2011 16:44:02 +0300 Subject: Add scales printing to --calc_statistics. --- generator/statistics.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'generator/statistics.cpp') diff --git a/generator/statistics.cpp b/generator/statistics.cpp index e76ace432b..00ab7f5d52 100644 --- a/generator/statistics.cpp +++ b/generator/statistics.cpp @@ -5,6 +5,7 @@ #include "../indexer/feature_processor.hpp" #include "../indexer/classificator.hpp" #include "../indexer/feature_impl.hpp" +#include "../indexer/data_factory.hpp" #include "../base/string_utils.hpp" @@ -19,23 +20,30 @@ using namespace feature; namespace stats { void FileContainerStatistic(string const & fPath) - { - FilesContainerR cont(fPath); + { + feature::DataHeader header; + ModelReaderPtr reader(new FileReader(fPath)); + LoadMapHeader(reader, header); vector tags; tags.push_back(VERSION_FILE_TAG); tags.push_back(HEADER_FILE_TAG); tags.push_back(DATA_FILE_TAG); - for (int i = 0; i < ARRAY_SIZE(feature::g_arrCountryScales); ++i) + for (size_t i = 0; i < header.GetScalesCount(); ++i) { + cout << header.GetScale(i) << " "; + tags.push_back(feature::GetTagForIndex(GEOMETRY_FILE_TAG, i)); tags.push_back(feature::GetTagForIndex(TRIANGLE_FILE_TAG, i)); } + cout << endl; + tags.push_back(INDEX_FILE_TAG); tags.push_back(SEARCH_INDEX_FILE_TAG); + FilesContainerR cont(reader); for (size_t i = 0; i < tags.size(); ++i) { cout << setw(7) << tags[i] << " : "; -- cgit v1.2.3