Change StaticRTree serialization constructor to static function
Since the constructor does not satisfy the requirements for a constructor (the RTree is not properly initialized) make it a static function instead.
This commit is contained in:
+4
-14
@@ -170,7 +170,10 @@ int Prepare::Process(int argc, char *argv[])
|
||||
|
||||
TIMER_STOP(expansion);
|
||||
|
||||
BuildRTree(node_based_edge_list);
|
||||
StaticRTree<EdgeBasedNode>::Build(node_based_edge_list,
|
||||
rtree_nodes_path.c_str(),
|
||||
rtree_leafs_path.c_str(),
|
||||
internal_to_external_node_map);
|
||||
|
||||
IteratorbasedCRC32<std::vector<EdgeBasedNode>> crc32;
|
||||
const unsigned node_based_edge_list_CRC32 =
|
||||
@@ -544,16 +547,3 @@ void Prepare::WriteNodeMapping()
|
||||
internal_to_external_node_map.shrink_to_fit();
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Building rtree-based nearest-neighbor data structure
|
||||
|
||||
Saves info to files: '.ramIndex' and '.fileIndex'.
|
||||
*/
|
||||
void Prepare::BuildRTree(std::vector<EdgeBasedNode> &node_based_edge_list)
|
||||
{
|
||||
SimpleLogger().Write() << "building r-tree ...";
|
||||
StaticRTree<EdgeBasedNode>(node_based_edge_list,
|
||||
rtree_nodes_path.c_str(),
|
||||
rtree_leafs_path.c_str(),
|
||||
internal_to_external_node_map);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ class Prepare
|
||||
DeallocatingVector<EdgeBasedEdge> &edgeBasedEdgeList,
|
||||
EdgeBasedGraphFactory::SpeedProfileProperties &speed_profile);
|
||||
void WriteNodeMapping();
|
||||
void BuildRTree(std::vector<EdgeBasedNode> &node_based_edge_list);
|
||||
|
||||
private:
|
||||
std::vector<NodeInfo> internal_to_external_node_map;
|
||||
|
||||
Reference in New Issue
Block a user