This repository has been archived on 2025-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
organicmaps-tmp/indexer/index_builder.hpp
2020-04-27 16:45:41 +03:00

26 lines
781 B
C++

#pragma once
#include "indexer/data_header.hpp"
#include "indexer/scale_index_builder.hpp"
#include <string>
namespace indexer
{
template <class TFeaturesVector, typename TWriter>
void BuildIndex(feature::DataHeader const & header, TFeaturesVector const & features,
TWriter & writer, std::string const & tmpFilePrefix)
{
LOG(LINFO, ("Building scale index."));
uint64_t indexSize;
{
SubWriter<TWriter> subWriter(writer);
covering::IndexScales(header, features, subWriter, tmpFilePrefix);
indexSize = subWriter.Size();
}
LOG(LINFO, ("Built scale index. Size =", indexSize));
}
// doesn't throw exceptions
bool BuildIndexFromDataFile(std::string const & dataFile, std::string const & tmpFile);
} // namespace indexer