[OSRM-talk] How to get point location from NodeID?

Nikolay Redko nredko at gmail.com
Fri Jul 26 13:17:33 UTC 2013


Hello!

I'm writing my own plugin to OSRM.
Trying to get second node of the edge and it's location.
This doesn't work:

NodeID nodeID = startPhantom.edgeBasedNode;
for(StaticGraph<QueryEdge::EdgeData>::EdgeIterator edge =
graph->BeginEdges(nodeID); edge < graph->EndEdges(nodeID); ++edge ) {
const QueryEdge::EdgeData & data = graph->GetEdgeData(edge);
const NodeID to = graph->GetTarget(edge);
_Coordinate coord;
searchEnginePtr->GetCoordinatesForNodeID(it->first, coord);
//here coord is some weird thing...
}

Can anybody help?
Thanks,
Nikolay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20130726/95614824/attachment.html>


More information about the OSRM-talk mailing list