[GraphHopper] Get direction of edges

Peter K peathal at yahoo.de
Tue Jul 23 09:00:24 UTC 2013


Hi Robert,

> Hello,
>
> I am searching for a way to get the direction of an edge when
> iterating it. I added some height information and a routing WeightCalc
> which is able to find the most energy efficient route. The problem is
> that I can not determine whether I access the edge up- or downhill. I
> found a solution to get the right directions when I already calculated
> the path. Because then i can check if the current edge is connected to
> the next edge via base or adjacent node. But how can I find the right
> directions while routing?

when you do getEdges(someNode, filter) then the returning EdgetIterators
already have the correct 'directions' as the adjacent nodes will always
be different to someNode.

> PS. it would be nice to have the EdgeIterator cloneable!

yes, will be in the next time :)

Regards,
Peter.





More information about the GraphHopper mailing list