[GraphHopper] traversing
Jan Torben Heuer
jan at komoot.de
Wed May 6 12:55:10 UTC 2015
Hi, I try to port some older code from 0.3 to 0.4. I have one problem when I try to inspect the edges around a calculated Path (with CH enabled):
QueryGraph g = ..
edgeExplorer = g.createEdgeExplorer();
Path p = routingAlgorithm.calcPath(from.getClosestNode(), to.getClosestNode());
for(EdgeIteratorState cur: p.calcEdges()) {
EdgeIterator edgeIterator = edgeExplorer.setBaseNode(cur.getAdjNode());
while(edgeIterator.next()) {
geometry = edgeIterator.fetchWayGeometry(3);
}
}
java.lang.IllegalStateException: Cannot call fetchWayGeometry on shortcut 274821
at com.graphhopper.storage.LevelGraphStorage$EdgeSkipIteratorImpl.fetchWayGeometry(LevelGraphStorage.java:246)
What would be the correct way to access the the edges around cur.getAdjNode()?
Thanks,
Jan
More information about the GraphHopper
mailing list