/** * For testing only */ protected GraphHopper loadGraph(GraphHopperStorage g) { this.ghStorage = g; fullyLoaded = true; initLocationIndex(); return this; }
/** * Does the preparation and creates the location index */ public void postProcessing() { // Later: move this into the GraphStorage.optimize method // Or: Doing it after preparation to optimize shortcuts too. But not possible yet #12 if (sortGraph) { if (ghStorage.isCHPossible() && isCHPrepared()) throw new IllegalArgumentException("Sorting a prepared CHGraph is not possible yet. See #12"); GraphHopperStorage newGraph = GHUtility.newStorage(ghStorage); GHUtility.sortDFS(ghStorage, newGraph); logger.info("graph sorted (" + getMemInfo() + ")"); ghStorage = newGraph; } if (hasElevation()) { interpolateBridgesAndOrTunnels(); } initLocationIndex(); if (chFactoryDecorator.isEnabled()) chFactoryDecorator.createPreparations(ghStorage, traversalMode); if (!isCHPrepared()) prepareCH(); if (lmFactoryDecorator.isEnabled()) lmFactoryDecorator.createPreparations(ghStorage, locationIndex); loadOrPrepareLM(); }
/** * For testing only */ protected GraphHopper loadGraph( GraphHopperStorage g ) { this.ghStorage = g; fullyLoaded = true; initLocationIndex(); return this; }
/** * For testing only */ protected GraphHopper loadGraph(GraphHopperStorage g) { this.ghStorage = g; fullyLoaded = true; initLocationIndex(); return this; }
/** * For testing only */ protected GraphHopper loadGraph(GraphHopperStorage g) { this.ghStorage = g; fullyLoaded = true; initLocationIndex(); return this; }
/** * Does the preparation and creates the location index */ protected void postProcessing() { // Later: move this into the GraphStorage.optimize method // Or: Doing it after preparation to optimize shortcuts too. But not possible yet #12 if (sortGraph) { if (ghStorage.isCHPossible() && isPrepared()) throw new IllegalArgumentException("Sorting a prepared CHGraph is not possible yet. See #12"); GraphHopperStorage newGraph = GHUtility.newStorage(ghStorage); GHUtility.sortDFS(ghStorage, newGraph); logger.info("graph sorted (" + Helper.getMemInfo() + ")"); ghStorage = newGraph; } initLocationIndex(); if (chFactoryDecorator.isEnabled()) createCHPreparations(); if (!isPrepared()) prepare(); }
/** * Does the preparation and creates the location index */ public void postProcessing() { // Later: move this into the GraphStorage.optimize method // Or: Doing it after preparation to optimize shortcuts too. But not possible yet #12 if (sortGraph) { if (ghStorage.isCHPossible() && isCHPrepared()) throw new IllegalArgumentException("Sorting a prepared CHGraph is not possible yet. See #12"); GraphHopperStorage newGraph = GHUtility.newStorage(ghStorage); GHUtility.sortDFS(ghStorage, newGraph); logger.info("graph sorted (" + Helper.getMemInfo() + ")"); ghStorage = newGraph; } if (hasElevation()) { interpolateBridgesAndOrTunnels(); } initLocationIndex(); if (chFactoryDecorator.isEnabled()) chFactoryDecorator.createPreparations(ghStorage, traversalMode); if (!isCHPrepared()) prepareCH(); if (lmFactoryDecorator.isEnabled()) lmFactoryDecorator.createPreparations(ghStorage, traversalMode, locationIndex); loadOrPrepareLM(); }
/** * Does the preparation and creates the location index */ public void postProcessing() { // Later: move this into the GraphStorage.optimize method // Or: Doing it after preparation to optimize shortcuts too. But not possible yet #12 if (sortGraph) { if (ghStorage.isCHPossible() && isCHPrepared()) throw new IllegalArgumentException("Sorting a prepared CHGraph is not possible yet. See #12"); GraphHopperStorage newGraph = GHUtility.newStorage(ghStorage); GHUtility.sortDFS(ghStorage, newGraph); logger.info("graph sorted (" + getMemInfo() + ")"); ghStorage = newGraph; } if (hasElevation()) { interpolateBridgesAndOrTunnels(); } initLocationIndex(); if (chFactoryDecorator.isEnabled()) chFactoryDecorator.createPreparations(ghStorage, traversalMode); if (!isCHPrepared()) prepareCH(); if (lmFactoryDecorator.isEnabled()) lmFactoryDecorator.createPreparations(ghStorage, locationIndex); loadOrPrepareLM(); }