[OSRM-talk] Questions on EdgeBasedGraph and NBGToEBG mapping
Stephane Clinchant
stephane.clinchant at gmail.com
Thu Feb 22 14:43:55 UTC 2018
Hi,
First of all, OS-RM is quite new for me, so the following may sound
as naive questions.
I'd like to dump some of the OS-RM graphs produced by the extractor to
benchmark
some code in python.
I could extract the node coordinates, the (Compressed)
Node Based Graph and the EdgeBasedGraph
. However, I am bit confused by the NBGtoEBG mapping and how to use it.
An Edge in the EdgeBased Graph has the form
[edge_source,edge_target,duration,weight]
To get the ids of the corresponding nodes, then I should look in the
NBGToEBG mapping
to find
those edge ids. If that ids is found in the forward field, then I take
the node source id,
else the target node id. Is that correct ? or is there a step I missed ?
So I tried that to plot some edges on a map from the node coordinates.
However, I found some nodes that are unlikely to be connected:
it looks like something is wrong in what I did.
My second question is: If ‘x’ is an edge of the edge based edge graph,
in what units is x.data.duration and x.data.weight ?
Thanks a lot,
Stéphane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20180222/23a69b2f/attachment.html>
More information about the OSRM-talk
mailing list