public final class GraphHopperStorage extends Object implements Graph, Closeable
| Constructor and Description |
|---|
GraphHopperStorage(Directory dir,
EncodingManager encodingManager,
boolean withElevation,
boolean withTurnCosts,
int segmentSize)
Use
GraphBuilder to create a graph |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
GraphHopperStorage |
create(long byteCount)
After configuring this storage you need to create it explicitly.
|
RoutingCHGraph |
createCHGraph(CHStorage store,
CHConfig chConfig) |
CHStorage |
createCHStorage(CHConfig chConfig) |
CHStorage |
createCHStorage(String name,
boolean edgeBased) |
EdgeExplorer |
createEdgeExplorer(EdgeFilter filter)
Returns an EdgeExplorer which makes it possible to traverse all filtered edges of a specific
node.
|
EdgeIteratorState |
edge(int a,
int b)
Creates an edge between the nodes a and b.
|
void |
flush() |
void |
flushAndCloseGeometryAndNameStorage()
Flush and free base graph resources like way geometries and StringIndex
|
void |
freeze()
Avoid that edges and nodes of the base graph are further modified.
|
AllEdgesIterator |
getAllEdges() |
Graph |
getBaseGraph() |
BBox |
getBounds()
Returns the implicit bounds of this graph calculated from the lat,lon input of setNode
|
long |
getCapacity() |
Directory |
getDirectory() |
EdgeIteratorState |
getEdgeIteratorState(int edgeId,
int adjNode)
Returns a wrapper over the specified edgeId.
|
EdgeIteratorState |
getEdgeIteratorStateForKey(int edgeKey)
Returns the edge state for the given edge key
|
int |
getEdges() |
EncodingManager |
getEncodingManager() |
NodeAccess |
getNodeAccess()
Creates an object to access node properties.
|
int |
getNodes() |
int |
getOtherNode(int edge,
int node) |
StorableProperties |
getProperties() |
TurnCostStorage |
getTurnCostStorage() |
boolean |
isAdjacentToNode(int edge,
int node) |
boolean |
isClosed() |
boolean |
isFrozen() |
CHStorage |
loadCHStorage(String chGraphName,
boolean edgeBased) |
boolean |
loadExisting() |
String |
toDetailsString() |
String |
toString() |
Weighting |
wrapWeighting(Weighting weighting)
Wraps the given weighting into a weighting that can be used by this graph
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateEdgeExplorerpublic GraphHopperStorage(Directory dir, EncodingManager encodingManager, boolean withElevation, boolean withTurnCosts, int segmentSize)
GraphBuilder to create a graphpublic RoutingCHGraph createCHGraph(CHStorage store, CHConfig chConfig)
public Directory getDirectory()
public GraphHopperStorage create(long byteCount)
public EncodingManager getEncodingManager()
public StorableProperties getProperties()
public boolean loadExisting()
public void flush()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic boolean isClosed()
public long getCapacity()
public void freeze()
public boolean isFrozen()
public String toDetailsString()
public Graph getBaseGraph()
getBaseGraph in interface Graphpublic int getNodes()
public int getEdges()
public NodeAccess getNodeAccess()
GraphgetNodeAccess in interface Graphpublic BBox getBounds()
Graphpublic EdgeIteratorState edge(int a, int b)
Graphpublic EdgeIteratorState getEdgeIteratorState(int edgeId, int adjNode)
GraphgetEdgeIteratorState in interface GraphadjNode - is the node that will be returned via getAdjNode(). If adjNode is
Integer.MIN_VALUE then the edge will be returned in the direction of how it is storedpublic EdgeIteratorState getEdgeIteratorStateForKey(int edgeKey)
GraphgetEdgeIteratorStateForKey in interface GraphEdgeIteratorState.getEdgeKey()public AllEdgesIterator getAllEdges()
getAllEdges in interface Graphpublic EdgeExplorer createEdgeExplorer(EdgeFilter filter)
GraphcreateEdgeExplorer in interface Graphpublic TurnCostStorage getTurnCostStorage()
getTurnCostStorage in interface GraphTurnCostStorage or null if not supportedpublic Weighting wrapWeighting(Weighting weighting)
GraphwrapWeighting in interface Graphpublic int getOtherNode(int edge,
int node)
getOtherNode in interface Graphpublic boolean isAdjacentToNode(int edge,
int node)
isAdjacentToNode in interface Graphpublic void flushAndCloseGeometryAndNameStorage()
Copyright © 2012–2022. All rights reserved.