Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2011-10-17 17:44:02 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:26:13 +0300
commit6c7afadd95d4250d37b42756719093acefecd56a (patch)
treed3614a6caf48c78911ca966c5b4bb5be4fa255aa /generator/statistics.cpp
parent57b754ae45cf46763847dd87716356dddfac5325 (diff)
Add scales printing to --calc_statistics.
Diffstat (limited to 'generator/statistics.cpp')
-rw-r--r--generator/statistics.cpp14
1 files changed, 11 insertions, 3 deletions
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<string> 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] << " : ";