[GraphHopper] traversing
dos65
qtankle at gmail.com
Wed May 6 13:03:52 UTC 2015
Hi, you should ignore shortcuts, you can cast your
EdgeExplorer/EdgeIterator to EdgeSkipExplorer/Iterator and use
"isShortcut()" method to detect these edges.
06.05.2015 15:55, Jan Torben Heuer пишет:
> 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
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper
More information about the GraphHopper
mailing list