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

index_builder.hpp « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1ac1ee7ebed38ba5f4f18603187eaadeb0e8e360 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include "indexer/data_header.hpp"
#include "indexer/scale_index_builder.hpp"

namespace indexer
{
template <class TFeaturesVector, typename TWriter>
void BuildIndex(feature::DataHeader const & header, TFeaturesVector const & features,
                TWriter & writer, 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(string const & datFile, string const & tmpFile);
}