Hi,
I’m using GraphHopper 0.6 and I meet some problems when I want to traverse edges for a given node.
For simplicity, I have a directed graph like this:
edge1 : A -> B (baseNode = A, adjNode = B)
edge2 : A -> C (baseNode = C, adjNode = A)
What I want is to get all edges, using node A as source node and I expect both edge1 and edge2 are returned, but actually only edge1 is returned. The code I used is:
EdgeExplorer explorer = baseGraph.createEdgeExplorer();
EdgeIterator iter = explorer.setBaseNode(nodeA);
iter.next(); ...
I guess the reason is that in edge2, the baseNode != A which makes it impossible to find edge2.
For edge2 I import it from osm file like this:
<way ...>
<nd ref="id for A"/>
<nd ref="id for C"/>
<tag k="highway" v="tertiary"/>
<tag k="oneway" v="yes"/>
</way ...>
so my questions are:
- What is used to determine the baseNode and adjNode? Is it the order of “nd” in osm? (I guess not?)
- For my case, is it possible to return both edge1 and edge2, given node A?
- If not, what should I do to achieve this?