[OSRM-talk] Accessing graph data in osrm
celion at lyft.com
Wed Nov 30 21:53:01 UTC 2016
I'm trying to write some code that accesses the road graph, so that I can
try out some alternative mapmatching algorithms (and also allow our data
scientists to experiment with some other things). We're already using osrm
in production, so leveraging the infrastructure we already have should in
theory make my life easier.
The GetAdjacentEdgeRange/GetTarget interface for the static graph (as
seems straightforward. However, I'm stuck trying to find a node or edge
close to a Coordinate as the starting point for my iterations. My two
attempts so far have been
1) Use BaseDataFacade::NearestPhantomNodesInRange() - it's not obvious to
me how to get the "real" node from the phantom node.
2) Use BaseDataFacade::GetEdgesInBox() gives reasonable-looking results -
the NodeIDs EdgeBasedNode::u and ::v appear correct when I pass them to
BaseDataFacade::GetCoordinateOfNode(). But the IDs are out of range when I
pass them to BaseDataFacade::GetAdjacentEdgeRange()
Any suggestions on how to salvage either of these approaches? Or is there a
better way to go about this?
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OSRM-talk