Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 2.28 KB

map.osrm.cnbg.md

File metadata and controls

36 lines (27 loc) · 2.28 KB

.osrm.cnbg

Contains compressed node based graph edges.

List

tar -tvf nevada-latest.osrm.cnbg
-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 /extractor/cnbg.meta
-rw-rw-r-- 0/0         5942480 1970-01-01 00:00 /extractor/cnbg

osrm_fingerprint.meta

/extractor/cnbg, /extractor/cnbg.meta

Stores CompressedNodeBasedGraphEdges.
Refer to Understanding OSRM Graph Representation - Basic Changes of Convert OSM to OSRM Edge-expanded Graph to understand how the compressed works.

Layout

Implementation

The node based graph will be compressed when construct it in NodeBasedGraphFactory::NodeBasedGraphFactory(). Then the CompressedNodeBasedGraphEdges will be written to file by files::writeCompressedNodeBasedGraph(), which will simply write the std::vector<CompressedNodeBasedGraphEdge> to file generated by toEdgeList().

// We encode the cnbg graph only using its topology as edge list
struct CompressedNodeBasedGraphEdge
{
    NodeID source;
    NodeID target;
};

The actual write will happen in writeCompressedNodeBasedGraph() that writes the std::vector<CompressedNodeBasedGraphEdge> to /extractor/cnbg directly.