Search in sources :

Example 1 with AllCHEdgesIterator

use of com.graphhopper.routing.util.AllCHEdgesIterator in project graphhopper by graphhopper.

the class GHUtility method printEdgeInfo.

public static void printEdgeInfo(final Graph g, FlagEncoder encoder) {
    System.out.println("-- Graph n:" + g.getNodes() + " e:" + g.getAllEdges().getMaxId() + " ---");
    AllEdgesIterator iter = g.getAllEdges();
    while (iter.next()) {
        String sc = "";
        if (iter instanceof AllCHEdgesIterator) {
            AllCHEdgesIterator aeSkip = (AllCHEdgesIterator) iter;
            sc = aeSkip.isShortcut() ? "sc" : "  ";
        }
        String fwdStr = iter.isForward(encoder) ? "fwd" : "   ";
        String bckStr = iter.isBackward(encoder) ? "bckwd" : "";
        System.out.println(sc + " " + iter + " " + fwdStr + " " + bckStr);
    }
}
Also used : AllEdgesIterator(com.graphhopper.routing.util.AllEdgesIterator) AllCHEdgesIterator(com.graphhopper.routing.util.AllCHEdgesIterator)

Aggregations

AllCHEdgesIterator (com.graphhopper.routing.util.AllCHEdgesIterator)1 AllEdgesIterator (com.graphhopper.routing.util.AllEdgesIterator)1