@Override public boolean loadExisting() { baseGraph.checkInit(); if (properties.loadExisting()) { properties.checkVersions(false); // check encoding for compatibility String flagEncodersStr = properties.get("graph.flag_encoders"); if (!flagEncodersStr.isEmpty() && !encodingManager.toDetailsString().equalsIgnoreCase(flagEncodersStr)) { throw new IllegalStateException("Encoding does not match:" + "\nGraphhopper config: " + encodingManager.toDetailsString() + "\nGraph: " + flagEncodersStr + "\nChange configuration to match the graph or delete " + dir.getLocation()); } String byteOrder = properties.get("graph.byte_order"); if (!byteOrder.equalsIgnoreCase("" + dir.getByteOrder())) throw new IllegalStateException("Configured graph.byte_order (" + dir.getByteOrder() + ") is not equal to loaded " + byteOrder + ""); String bytesForFlags = properties.get("graph.bytes_for_flags"); if (!bytesForFlags.equalsIgnoreCase("" + encodingManager.getBytesForFlags())) throw new IllegalStateException("Configured graph.bytes_for_flags (" + encodingManager.getBytesForFlags() + ") is not equal to loaded " + bytesForFlags); String dim = properties.get("graph.dimension"); baseGraph.loadExisting(dim); checkIfConfiguredAndLoadedWeightingsCompatible(); for (CHGraphImpl cg : chGraphs) { if (!cg.loadExisting()) throw new IllegalStateException("Cannot load " + cg); } return true; } return false; }
if (!cg.loadExisting()) throw new IllegalStateException("Cannot load " + cg);
if (!cg.loadExisting()) throw new IllegalStateException("Cannot load " + cg);
@Override public boolean loadExisting() { baseGraph.checkInit(); if (properties.loadExisting()) { properties.checkVersions(false); // check encoding for compatibility String flagEncodersStr = properties.get("graph.flag_encoders"); if (!flagEncodersStr.isEmpty() && !encodingManager.toDetailsString().equalsIgnoreCase(flagEncodersStr)) { throw new IllegalStateException("Encoding does not match:" + "\nGraphhopper config: " + encodingManager.toDetailsString() + "\nGraph: " + flagEncodersStr + "\nChange configuration to match the graph or delete " + dir.getLocation()); } String byteOrder = properties.get("graph.byte_order"); if (!byteOrder.equalsIgnoreCase("" + dir.getByteOrder())) throw new IllegalStateException("Configured graph.byte_order (" + dir.getByteOrder() + ") is not equal to loaded " + byteOrder + ""); String bytesForFlags = properties.get("graph.bytes_for_flags"); if (!bytesForFlags.equalsIgnoreCase("" + encodingManager.getBytesForFlags())) throw new IllegalStateException("Configured graph.bytes_for_flags (" + encodingManager.getBytesForFlags() + ") is not equal to loaded " + bytesForFlags); String dim = properties.get("graph.dimension"); baseGraph.loadExisting(dim); checkIfConfiguredAndLoadedWeightingsCompatible(); for (CHGraphImpl cg : chGraphs) { if (!cg.loadExisting()) throw new IllegalStateException("Cannot load " + cg); } return true; } return false; }