Works, Thank you dos, Peter! Jan
Am 07.05.2015 um 00:30 schrieb Peter <[email protected]>: > Hi Jan, > > you can use the new method graph.getBaseGraph which gives you the > none-CH graph in the CH-case and avoids this exception. > > Kind Regards, > Peter > > On 06.05.2015 15:03, dos65 wrote: >> 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 >>> [email protected] >>> https://lists.openstreetmap.org/listinfo/graphhopper >> >> >> _______________________________________________ >> GraphHopper mailing list >> [email protected] >> https://lists.openstreetmap.org/listinfo/graphhopper > > > _______________________________________________ > GraphHopper mailing list > [email protected] > https://lists.openstreetmap.org/listinfo/graphhopper _______________________________________________ GraphHopper mailing list [email protected] https://lists.openstreetmap.org/listinfo/graphhopper
