diff options
author | Добрый Ээх <bukharaev@gmail.com> | 2016-11-29 23:26:21 +0300 |
---|---|---|
committer | Добрый Ээх <bukharaev@gmail.com> | 2016-12-07 12:31:39 +0300 |
commit | e86680646f078572655373c9591d294f952aba28 (patch) | |
tree | 3b447a539912efb33e186f5f504f5bcdfdff3e21 /generator | |
parent | fce37cc9a0483aed41aaa15ad5b20ee64bd4c3e0 (diff) |
index graph serialiser: first compressed version
Diffstat (limited to 'generator')
-rw-r--r-- | generator/routing_index_generator.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/generator/routing_index_generator.cpp b/generator/routing_index_generator.cpp index 078f16eb13..e806f74e00 100644 --- a/generator/routing_index_generator.cpp +++ b/generator/routing_index_generator.cpp @@ -1,12 +1,12 @@ #include "generator/routing_index_generator.hpp" #include "routing/index_graph.hpp" +#include "routing/index_graph_serializer.hpp" #include "routing/routing_helpers.hpp" #include "indexer/feature.hpp" #include "indexer/feature_processor.hpp" #include "indexer/point_to_int64.hpp" -#include "indexer/routing_section.hpp" #include "coding/file_container.hpp" @@ -74,15 +74,16 @@ bool BuildRoutingIndex(string const & filename) IndexGraph graph; processor.BuildGraph(graph); - LOG(LINFO, ("Routing index contains", graph.GetNumRoads(), "roads,", graph.GetNumJoints(), - "joints,", graph.GetNumPoints(), "points")); FilesContainerW cont(filename, FileWriter::OP_WRITE_EXISTING); FileWriter writer = cont.GetWriter(ROUTING_FILE_TAG); - RoutingSectionHeader const routingHeader; - routingHeader.Serialize(writer); - graph.Serialize(writer); + auto const startPos = writer.Pos(); + IndexGraphSerializer::Serialize(graph, writer); + auto const sectionSize = writer.Pos() - startPos; + + LOG(LINFO, ("Routing section created:", sectionSize, "bytes,", graph.GetNumRoads(), "roads,", + graph.GetNumJoints(), "joints,", graph.GetNumPoints(), "points")); return true; } catch (RootException const & e) |