boolean prepareEdges() { // In CH the setProperties (speed) are ignored as calculating the new setProperties for a // shortcut is often not possible. // Also several shortcuts would be necessary with the different modes (e.g. fastest and // shortest) // So calculate the weight and store this as weight, then use only weight instead of calcWeight EdgeIterator iter = g.getAllEdges(); int c = 0; while (iter.next()) { c++; iter.setDistance(prepareWeighting.calcWeight(iter)); setOrigEdgeCount(iter.getEdge(), 1); } return c > 0; }