[GraphHopper] Extract a single edge?
Peter K
peathal at yahoo.de
Mon Dec 16 20:11:43 UTC 2013
> Maybe i understand the problem... Could it be that an edge explorer
> only iterates over edges of which the base node is the base node?
> Makes sense somehow.
> Now is the problem: How can i find an edge to which a given node is
> the adjacent node?
Not sure if I understand completely. Maybe the problem you are having is
that with CH a node is only connected to nodes with a higher level but
still you should get all edges. And since you don't want shortcut edges
this cannot be the problem. Hmmh.
Or maybe the API is unclear? 'base' and 'adjacent' node is dependent of
how you traverse the graph, not e.g. if this direction is accessible for
car. E.g. if you have a simple graph '1-2-3' and you do
iter = explorer.setBaseNode(1)
while(iter.next()) {
edgeIds.add(iter.getEdge());
}
=> you'll only get one edge id with adjacent node '2'
iter = explorer.setBaseNode(2)
while(iter.next()) {
edgeIds.add(iter.getEdge());
}
=> you'll get two edge ids with adjacent node '1' and '3' where the
order is not defined
Regards,
Peter.
More information about the GraphHopper
mailing list