public NameIndex(Directory dir) { names = dir.find("names"); }
public StorableProperties(Directory dir) { this.da = dir.find("properties"); // reduce size da.setSegmentSize(1 << 15); }
@Override public void init(Graph graph, Directory dir) { if (turnCostsCount > 0) throw new AssertionError("The turn cost storage must be initialized only once."); this.nodeAccess = graph.getNodeAccess(); this.turnCosts = dir.find("turn_costs"); }
public PillarInfo(boolean enabled3D, Directory dir) { this.enabled3D = enabled3D; this.dir = dir; this.da = dir.find("tmp_pillar_info").create(100); this.rowSizeInBytes = getDimension() * 4; }
public Location2IDQuadtree(Graph g, Directory dir) { this.graph = g; this.nodeAccess = g.getNodeAccess(); index = dir.find("loc2id_index"); setResolution(100 * 100); }
/** * @param g the graph for which this index should do the lookup based on latitude,longitude. */ public LocationIndexTree(Graph g, Directory dir) { if (g instanceof CHGraph) throw new IllegalArgumentException("Use base graph for LocationIndexTree instead of CHGraph"); MAGIC_INT = Integer.MAX_VALUE / 22316; this.graph = g; this.nodeAccess = g.getNodeAccess(); dataAccess = dir.find("location_index", DAType.getPreferredInt(dir.getDefaultType())); }
public SubnetworkStorage(Directory dir, String postfix) { DAType type = dir.getDefaultType(); da = dir.find("subnetwork_" + postfix, type.isMMap() ? DAType.MMAP : (type.isStoring() ? DAType.RAM_STORE : DAType.RAM)); }
this.baseGraph = baseGraph; final String name = AbstractWeighting.weightingToFileName(w); this.nodesCH = dir.find("nodes_ch_" + name, DAType.getPreferredInt(dir.getDefaultType())); this.shortcuts = dir.find("shortcuts_" + name, DAType.getPreferredInt(dir.getDefaultType())); this.chEdgeAccess = new EdgeAccess(shortcuts, baseGraph.bitUtil) { @Override
this.encodingManager = encodingManager; this.bitUtil = BitUtil.get(dir.getByteOrder()); this.wayGeometry = dir.find("geometry"); this.nameIndex = new NameIndex(dir); this.nodes = dir.find("nodes", DAType.getPreferredInt(dir.getDefaultType())); this.edges = dir.find("edges", DAType.getPreferredInt(dir.getDefaultType())); this.listener = listener; this.edgeAccess = new EdgeAccess(edges, bitUtil) {
DataAccess heights = getDirectory().find(name + ".gh"); demProvider.setHeights(heights); boolean loadExisting = false;
@Test public void testNoErrorForDACreate() { Directory dir = createDir(); da = dir.find("testing"); da.create(100); da.flush(); } }
return 0; DataAccess heights = getDirectory().find("dem" + intKey); boolean loadExisting = false; try {
@Test public void testEnsureSize() { Directory dir = new RAMDirectory(); graph = newGHStorage(dir, false).create(defaultSize); int roughEdgeRowLength = 4 * 8; int testIndex = dir.find("edges", DAType.RAM_INT).getSegmentSize() * 3 / roughEdgeRowLength; // we need a big node index to trigger multiple segments, but low enough to avoid OOM graph.edge(0, testIndex, 10, true); // test if optimize works without error graph.optimize(); }
ghStorage.edge(0, 1, 40, true); Directory dir = new RAMDirectory(); DataAccess da = dir.find("landmarks_fastest_car"); da.create(2000);
/** * @param g the graph for which this index should do the lookup based on latitude,longitude. */ public LocationIndexTree( Graph g, Directory dir ) { if (g instanceof CHGraph) throw new IllegalArgumentException("Use base graph for LocationIndexTree instead of CHGraph"); MAGIC_INT = Integer.MAX_VALUE / 22316; this.graph = g; this.nodeAccess = g.getNodeAccess(); dataAccess = dir.find("location_index"); }
@Override public void init(Graph graph, Directory dir) { if (turnCostsCount > 0) throw new AssertionError("The turn cost storage must be initialized only once."); this.nodeAccess = graph.getNodeAccess(); this.turnCosts = dir.find("turn_costs"); }
public Location2IDQuadtree(Graph g, Directory dir) { this.graph = g; this.nodeAccess = g.getNodeAccess(); index = dir.find("loc2id_index"); setResolution(100 * 100); }
public PrepareContractionHierarchies( Directory dir, GraphHopperStorage ghStorage, CHGraph chGraph, FlagEncoder encoder, Weighting weighting, TraversalMode traversalMode ) { this.ghStorage = ghStorage; this.prepareGraph = (CHGraphImpl) chGraph; this.traversalMode = traversalMode; this.prepareFlagEncoder = encoder; levelFilter = new LevelEdgeFilter(prepareGraph); prepareWeighting = new PreparationWeighting(weighting); originalEdges = dir.find("original_edges_" + AbstractWeighting.weightingToFileName(weighting)); originalEdges.create(1000); }