/** * 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(); }
/** * This method creates prepations. * * @deprecated use getCHFactoryDecorator().createPreparations() instead. Will be removed in 0.8. */ protected void createCHPreparations() { chFactoryDecorator.createPreparations(ghStorage, traversalMode); }
/** * 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(); }
/** * 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(); }