public class GraphBuilder extends Object
GraphHopperStorage
Constructor and Description |
---|
GraphBuilder(EncodingManager encodingManager) |
Modifier and Type | Method and Description |
---|---|
GraphHopperStorage |
build()
Default graph is a
GraphHopperStorage with an in memory directory and disabled storing on flush. |
GraphHopperStorage |
create()
Default graph is a
GraphHopperStorage with an in memory directory and disabled storing on flush. |
GraphBuilder |
set3D(boolean withElevation) |
GraphBuilder |
setBytes(long bytes) |
GraphBuilder |
setCHConfigs(CHConfig... chConfigs) |
GraphBuilder |
setCHConfigs(List<CHConfig> chConfigs) |
GraphBuilder |
setCHConfigStrings(String... profileStrings)
Convenience method to set the CH profiles using a string representation.
|
GraphBuilder |
setDir(Directory dir) |
GraphBuilder |
setMMap(String location) |
GraphBuilder |
setRAM() |
GraphBuilder |
setRAM(String location) |
GraphBuilder |
setRAM(String location,
boolean store) |
GraphBuilder |
setSegmentSize(int segmentSize) |
static GraphBuilder |
start(EncodingManager encodingManager) |
GraphBuilder |
withTurnCosts(boolean turnCosts) |
public GraphBuilder(EncodingManager encodingManager)
public static GraphBuilder start(EncodingManager encodingManager)
public GraphBuilder setCHConfigStrings(String... profileStrings)
CHConfig
s, because otherwise when using setCHConfigs(java.util.List<com.graphhopper.storage.CHConfig>)
you first have to
build()
the GraphHopperStorage
to obtain a TurnCostStorage
to be able to create the
Weighting
you need for the CHConfig
to be added...
todo: Currently this only supports a few weightings with limited extra options. The reason is that here the
same should happen as in the 'real' GraphHopper graph, reading the real config, but this is likely to change
soon.public GraphBuilder setCHConfigs(List<CHConfig> chConfigs)
public GraphBuilder setCHConfigs(CHConfig... chConfigs)
public GraphBuilder setDir(Directory dir)
public GraphBuilder setMMap(String location)
public GraphBuilder setRAM()
public GraphBuilder setRAM(String location)
public GraphBuilder setRAM(String location, boolean store)
public GraphBuilder setBytes(long bytes)
public GraphBuilder set3D(boolean withElevation)
public GraphBuilder withTurnCosts(boolean turnCosts)
public GraphBuilder setSegmentSize(int segmentSize)
public GraphHopperStorage build()
GraphHopperStorage
with an in memory directory and disabled storing on flush.
Afterwards you'll need to call GraphHopperStorage.create(long)
to have a usable object. Better use
create()
directly.public GraphHopperStorage create()
GraphHopperStorage
with an in memory directory and disabled storing on flush.Copyright © 2012–2020. All rights reserved.