[generator] Added rank table generation stage.

This commit is contained in:
Yuri Gorshenin 2015-10-08 16:55:22 +03:00 committed by Sergey Yershov
parent 7fa65e1d19
commit 7cab5585bd

View file

@ -11,16 +11,18 @@
#include "generator/routing_generator.hpp"
#include "generator/osm_source.hpp"
#include "indexer/drawing_rules.hpp"
#include "indexer/classificator_loader.hpp"
#include "indexer/classificator.hpp"
#include "indexer/classificator_loader.hpp"
#include "indexer/data_header.hpp"
#include "indexer/drawing_rules.hpp"
#include "indexer/features_offsets_table.hpp"
#include "indexer/features_vector.hpp"
#include "indexer/index_builder.hpp"
#include "indexer/map_style_reader.hpp"
#include "indexer/rank_table.hpp"
#include "indexer/search_index_builder.hpp"
#include "coding/file_container.hpp"
#include "coding/file_name_utils.hpp"
#include "base/timer.hpp"
@ -35,6 +37,7 @@
#include "std/fstream.hpp"
#include "std/iomanip.hpp"
#include "std/numeric.hpp"
#include "std/vector.hpp"
DEFINE_bool(generate_update, false,
@ -205,6 +208,17 @@ int main(int argc, char ** argv)
if (!indexer::BuildSearchIndexFromDatFile(datFile, true))
LOG(LCRITICAL, ("Error generating search index."));
LOG(LINFO, ("Generating rank table for ", datFile));
vector<uint8_t> ranks;
{
FilesContainerR rcont(datFile);
search::RankTableBuilder::CalcSearchRanks(rcont, ranks);
}
{
FilesContainerW wcont(datFile, FileWriter::OP_WRITE_EXISTING);
search::RankTableBuilder::Create(ranks, wcont);
}
}
}