<div dir="ltr"><div>Hi folks,</div><div>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.</div><div><br></div><div>The GetAdjacentEdgeRange/GetTarget interface for the static graph (as described inĀ <a href="https://github.com/Project-OSRM/osrm-backend/wiki/Quick-start-to-Code">https://github.com/Project-OSRM/osrm-backend/wiki/Quick-start-to-Code</a>) 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</div><div><br></div><div>1) Use BaseDataFacade::NearestPhantomNodesInRange() - it's not obvious to me how to get the "real" node from the phantom node.</div><div>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()</div><div><br></div><div>Any suggestions on how to salvage either of these approaches? Or is there a better way to go about this?</div><div><br></div><div>Thanks in advance!</div><div><br></div><div>-Chris</div>
</div>