public void createPreparations(GraphHopperStorage ghStorage, TraversalMode traversalMode) { if (!isEnabled() || !preparations.isEmpty()) return; if (weightings.isEmpty()) throw new IllegalStateException("No CH weightings found"); traversalMode = getNodeBase(); for (Weighting weighting : getWeightings()) { PrepareContractionHierarchies tmpPrepareCH = PrepareContractionHierarchies.fromGraphHopperStorage( ghStorage, weighting, traversalMode); tmpPrepareCH.setParams(pMap); addPreparation(tmpPrepareCH); } }
ghStorage = new GraphHopperStorage(chFactoryDecorator.getWeightings(), dir, encodingManager, hasElevation(), ext); } else { ghStorage = new GraphHopperStorage(dir, encodingManager, hasElevation(), ext);
@Override protected void prepareCH() { StopWatch sw = new StopWatch().start(); super.prepareCH(); put(Parameters.CH.PREPARE + "time", sw.stop().getMillis()); int edges = getGraphHopperStorage().getAllEdges().length(); if (getCHFactoryDecorator().hasWeightings()) { Weighting weighting = getCHFactoryDecorator().getWeightings().get(0); int edgesAndShortcuts = getGraphHopperStorage().getGraph(CHGraph.class, weighting).getEdges(); put(Parameters.CH.PREPARE + "shortcuts", edgesAndShortcuts - edges); } }
Weighting weighting = hopper.getCHFactoryDecorator().getWeightings().get(0); CHGraph lg = g.getGraph(CHGraph.class, weighting); fillAllowedEdges(lg.getAllEdges(), allowedEdges);
if (ch) { map.put(Parameters.Landmark.DISABLE, true); weighting = hopper.getCHFactoryDecorator().getWeightings().get(0); routingGraph = hopper.getGraphHopperStorage().getGraph(CHGraph.class, weighting);
final HintsMap chHints = new HintsMap(defaultHints).put(Parameters.CH.DISABLE, false); Weighting pickedWeighting = null; for (Weighting tmpWeighting : hopper.getCHFactoryDecorator().getWeightings()) { if (tmpWeighting.equals(weighting)) { pickedWeighting = tmpWeighting; throw new IllegalStateException("Didn't find weighting " + hints.getWeighting() + " in " + hopper.getCHFactoryDecorator().getWeightings());
public void createPreparations(GraphHopperStorage ghStorage, TraversalMode traversalMode) { if (!isEnabled() || !preparations.isEmpty()) return; if (weightings.isEmpty()) throw new IllegalStateException("No CH weightings found"); traversalMode = getNodeBase(); for (Weighting weighting : getWeightings()) { PrepareContractionHierarchies tmpPrepareCH = new PrepareContractionHierarchies( new GHDirectory("", DAType.RAM_INT), ghStorage, ghStorage.getGraph(CHGraph.class, weighting), traversalMode); tmpPrepareCH.setParams(pMap); addPreparation(tmpPrepareCH); } }
public void createPreparations( GraphHopperStorage ghStorage, TraversalMode traversalMode ) { if (!isEnabled() || !preparations.isEmpty()) return; if (weightings.isEmpty()) throw new IllegalStateException("No CH weightings found"); traversalMode = getNodeBase(); for (Weighting weighting : getWeightings()) { PrepareContractionHierarchies tmpPrepareCH = new PrepareContractionHierarchies( new GHDirectory("", DAType.RAM_INT), ghStorage, ghStorage.getGraph(CHGraph.class, weighting), weighting.getFlagEncoder(), weighting, traversalMode); tmpPrepareCH.setPeriodicUpdates(preparationPeriodicUpdates). setLazyUpdates(preparationLazyUpdates). setNeighborUpdates(preparationNeighborUpdates). setLogMessages(preparationLogMessages); addPreparation(tmpPrepareCH); } }
public void createPreparations(GraphHopperStorage ghStorage, TraversalMode traversalMode) { if (!isEnabled() || !preparations.isEmpty()) return; if (weightings.isEmpty()) throw new IllegalStateException("No CH weightings found"); traversalMode = getNodeBase(); for (Weighting weighting : getWeightings()) { if (weighting instanceof GenericWeighting) { ((GenericWeighting) weighting).setGraph(ghStorage); } PrepareContractionHierarchies tmpPrepareCH = new PrepareContractionHierarchies( new GHDirectory("", DAType.RAM_INT), ghStorage, ghStorage.getGraph(CHGraph.class, weighting), weighting, traversalMode); tmpPrepareCH.setPeriodicUpdates(preparationPeriodicUpdates). setLazyUpdates(preparationLazyUpdates). setNeighborUpdates(preparationNeighborUpdates). setLogMessages(preparationLogMessages); addPreparation(tmpPrepareCH); } }
ghStorage = new GraphHopperStorage(chFactoryDecorator.getWeightings(), dir, encodingManager, hasElevation(), ext); } else
ghStorage = new GraphHopperStorage(chFactoryDecorator.getWeightings(), dir, encodingManager, hasElevation(), ext); } else { ghStorage = new GraphHopperStorage(dir, encodingManager, hasElevation(), ext);
ghStorage = new GraphHopperStorage(chFactoryDecorator.getWeightings(), dir, encodingManager, hasElevation(), ext); } else { ghStorage = new GraphHopperStorage(dir, encodingManager, hasElevation(), ext);