Maps node based graph to edge based graph.
tar -tvf nevada-latest.osrm.cnbg_to_ebg
-rw-rw-r-- 0/0 8 1970-01-01 00:00 osrm_fingerprint.meta
-rw-rw-r-- 0/0 8 1970-01-01 00:00 /common/cnbg_to_ebg.meta
-rw-rw-r-- 0/0 6085136 1970-01-01 00:00 /common/cnbg_to_ebg
Stores NBGToEBG mapping.
Refer to Understanding OSRM Graph Representation - Basic Changes of Convert OSM to OSRM Edge-expanded Graph to understand what is the edge-expanded graph and how does it be generated.
The NBGToEBG mapping is a vector which will be generated by GenerateEdgeExpandedNodes. Then use files::writeNBGMapping to write it to .osrm.cnbg_to_ebg
file directly.
TIMER_START(generate_nodes);
{
// [Jay] generate the NBGToEBG mapping and write to file
auto mapping = GenerateEdgeExpandedNodes(way_restriction_map);
files::writeNBGMapping(cnbg_ebg_mapping_path, mapping);
}
Each NBGToEBG structure see below definition:
// Mapping between the node based graph u,v nodes and the edge based graph head,tail edge ids.
// Required in the osrm-partition tool to translate from a nbg partition to a ebg partition.
struct NBGToEBG
{
NodeID u, v;
NodeID forward_ebg_node, backward_ebg_node;
};