private boolean isCHPrepared() { return "true".equals(ghStorage.getProperties().get(CH.PREPARE + "done")) // remove old property in >0.9 || "true".equals(ghStorage.getProperties().get("prepare.done")); }
private boolean isLMPrepared() { return "true".equals(ghStorage.getProperties().get(Landmark.PREPARE + "done")); }
protected void prepareCH() { boolean tmpPrepare = chFactoryDecorator.isEnabled(); if (tmpPrepare) { ensureWriteAccess(); ghStorage.freeze(); chFactoryDecorator.prepare(ghStorage.getProperties()); ghStorage.getProperties().put(CH.PREPARE + "done", true); } }
/** * For landmarks it is required to always call this method: either it creates the landmark data or it loads it. */ protected void loadOrPrepareLM() { boolean tmpPrepare = lmFactoryDecorator.isEnabled() && !lmFactoryDecorator.getPreparations().isEmpty(); if (tmpPrepare) { ensureWriteAccess(); ghStorage.freeze(); if (lmFactoryDecorator.loadOrDoWork(ghStorage.getProperties())) ghStorage.getProperties().put(Landmark.PREPARE + "done", true); } }
@GET public Info getInfo() { final Info info = new Info(); // use bbox always without elevation (for backward compatibility) info.bbox = new BBox(storage.getBounds().minLon, storage.getBounds().maxLon, storage.getBounds().minLat, storage.getBounds().maxLat); info.supported_vehicles = storage.getEncodingManager().toString().split(","); for (String v : info.supported_vehicles) { Info.PerVehicle perVehicleJson = new Info.PerVehicle(); perVehicleJson.elevation = hasElevation; info.features.put(v, perVehicleJson); } info.import_date = storage.getProperties().get("datareader.import.date"); info.data_date = storage.getProperties().get("datareader.data.date"); info.prepare_ch_date = storage.getProperties().get("prepare.ch.date"); info.prepare_date = storage.getProperties().get("prepare.ch.date"); return info; } }
@Override public String toString() { return (isCHPossible() ? "CH|" : "") + encodingManager + "|" + getDirectory().getDefaultType() + "|" + baseGraph.nodeAccess.getDimension() + "D" + "|" + baseGraph.extStorage + "|" + getProperties().versionsToString(); }
DataReader reader = importData(); DateFormat f = createFormatter(); ghStorage.getProperties().put("datareader.import.date", f.format(new Date())); if (reader.getDataDate() != null) ghStorage.getProperties().put("datareader.data.date", f.format(reader.getDataDate())); } catch (IOException ex) { throw new RuntimeException("Cannot read file " + getDataReaderFile(), ex);
private boolean isCHPrepared() { return "true".equals(ghStorage.getProperties().get(CH.PREPARE + "done")) // remove old property in >0.9 || "true".equals(ghStorage.getProperties().get("prepare.done")); }
private boolean isCHPrepared() { return "true".equals(ghStorage.getProperties().get(CH.PREPARE + "done")) // remove old property in >0.9 || "true".equals(ghStorage.getProperties().get("prepare.done")); }
private boolean isLMPrepared() { return "true".equals(ghStorage.getProperties().get(Landmark.PREPARE + "done")); }
private boolean isPrepared() { return "true".equals(ghStorage.getProperties().get("prepare.done")); }
private boolean isLMPrepared() { return "true".equals(ghStorage.getProperties().get(Landmark.PREPARE + "done")); }
protected void prepareCH() { boolean tmpPrepare = chFactoryDecorator.isEnabled(); if (tmpPrepare) { ensureWriteAccess(); ghStorage.freeze(); chFactoryDecorator.prepare(ghStorage.getProperties()); ghStorage.getProperties().put(CH.PREPARE + "done", true); } }
/** * For landmarks it is required to always call this method: either it creates the landmark data or it loads it. */ protected void loadOrPrepareLM() { boolean tmpPrepare = lmFactoryDecorator.isEnabled(); if (tmpPrepare) { ensureWriteAccess(); ghStorage.freeze(); if (lmFactoryDecorator.loadOrDoWork(ghStorage.getProperties())) ghStorage.getProperties().put(Landmark.PREPARE + "done", true); } }
/** * For landmarks it is required to always call this method: either it creates the landmark data or it loads it. */ protected void loadOrPrepareLM() { boolean tmpPrepare = lmFactoryDecorator.isEnabled() && !lmFactoryDecorator.getPreparations().isEmpty(); if (tmpPrepare) { ensureWriteAccess(); ghStorage.freeze(); if (lmFactoryDecorator.loadOrDoWork(ghStorage.getProperties())) ghStorage.getProperties().put(Landmark.PREPARE + "done", true); } }
protected void prepareCH() { boolean tmpPrepare = chFactoryDecorator.isEnabled(); if (tmpPrepare) { ensureWriteAccess(); if (chFactoryDecorator.getPreparationThreads() > 1 && dataAccessType.isMMap() && !dataAccessType.isSynched()) throw new IllegalStateException("You cannot execute CH preparation in parallel for MMAP without synching! Specify MMAP_SYNC or use 1 thread only"); ghStorage.freeze(); chFactoryDecorator.prepare(ghStorage.getProperties()); ghStorage.getProperties().put(CH.PREPARE + "done", true); } }
protected void prepare() { boolean tmpPrepare = chFactoryDecorator.isEnabled(); if (tmpPrepare) { ensureWriteAccess(); if (chFactoryDecorator.getPreparationThreads() > 1 && dataAccessType.isMMap() && !dataAccessType.isSynched()) throw new IllegalStateException("You cannot execute CH preparation in parallel for MMAP without synching! Specify MMAP_SYNC or use 1 thread only"); ghStorage.freeze(); chFactoryDecorator.prepare(ghStorage.getProperties()); } ghStorage.getProperties().put("prepare.done", tmpPrepare); }
@Override public String toString() { return (isCHPossible() ? "CH|" : "") + encodingManager + "|" + getDirectory().getDefaultType() + "|" + baseGraph.nodeAccess.getDimension() + "D" + "|" + baseGraph.extStorage + "|" + getProperties().versionsToString(); }
@Override public String toString() { return (isCHPossible() ? "CH|" : "") + encodingManager + "|" + getDirectory().getDefaultType() + "|" + baseGraph.nodeAccess.getDimension() + "D" + "|" + baseGraph.extStorage + "|" + getProperties().versionsToString(); }
@Override public String toString() { return (isCHPossible() ? "CH|" : "") + encodingManager + "|" + getDirectory().getDefaultType() + "|" + baseGraph.nodeAccess.getDimension() + "D" + "|" + baseGraph.extStorage + "|" + getProperties().versionsToString(); }