forked from organicmaps/organicmaps
Fixes.
This commit is contained in:
parent
a9a270263c
commit
a0895baefb
2 changed files with 11 additions and 2 deletions
|
@ -368,6 +368,7 @@ void OsrmFtSegBackwardIndex::Construct(const OsrmFtSegMapping & mapping, const u
|
|||
string const nodesFileName = p.GetIndexFileName(name, FTSEG_MAPPING_BACKWARD_INDEX_NODES_EXT);
|
||||
|
||||
m_table = feature::FeaturesOffsetsTable::CreateIfNotExistsAndLoad(offsetsIndexName, FilesContainerR(mwmName));
|
||||
CHECK(m_table.get(), ("Can't get FeaturesOffsetsTable for", mwmName));
|
||||
|
||||
if (Load(bitsFileName, nodesFileName))
|
||||
return;
|
||||
|
|
|
@ -59,8 +59,16 @@ void TestMapping(InputDataT const & data,
|
|||
bind(FileWriter::DeleteFileX, featuresOffsetsTablePath));
|
||||
|
||||
{
|
||||
// Prepare fake features offsets table for input data, just push all
|
||||
// segments feature ids as offsets.
|
||||
// Prepare fake features offsets table for input data, because
|
||||
// OsrmFtSegMapping::Load() loads routing index and creates
|
||||
// additional helper indexes and some of them require
|
||||
// FeatureOffsetsTable existence.
|
||||
//
|
||||
// As instantiation of FeatureOffsetsTable requires complete MWM
|
||||
// file with features or at least already searialized
|
||||
// FeatureOffsetsTable, the purpose of this code is to prepare a
|
||||
// file with serialized FeatureOffsetsTable and feed it to
|
||||
// OsrmFtSegMapping.
|
||||
feature::FeaturesOffsetsTable::Builder tableBuilder;
|
||||
for (auto const & segVector : data)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue