Osm way vs graphhopper edge direction

i have traffic data per osm way per direction, for example for way_id=x i have 2 traffic speeds, one forward and one backward.
i have saved edgeId->osmId mapping in my app and now periodically want to set edge speeds.
question is do the direction of osm way matches the direction that graphhopper edges are saved? if true then i can do something like:

if(direction = forward)
    graph.getEdgeIteratorState(edgeId, Integer.MIN_VALUE).setSpeed(trafficSpeed);
else
    graph.getEdgeIteratorState(edgeId, Integer.MIN_VALUE).setBackwardSpeed(trafficSpeed);

maybe i should have created this topic in developers category.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Powered by Discourse