public class EncodingManager extends Object implements EncodedValueLookup
EncodingManager.start(4).add(new CarFlagEncoder()).build();
Modifier and Type | Class and Description |
---|---|
static class |
EncodingManager.AcceptWay |
static class |
EncodingManager.Access |
static class |
EncodingManager.Builder |
Modifier and Type | Field and Description |
---|---|
static String |
ROUNDABOUT |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptWay(ReaderWay way,
EncodingManager.AcceptWay acceptWay)
Determine whether a way is routable for one of the added encoders.
|
void |
applyWayTags(ReaderWay way,
EdgeIteratorState edge) |
static EncodingManager |
create(FlagEncoder... flagEncoders)
Instantiate manager with the given list of encoders.
|
static EncodingManager |
create(FlagEncoderFactory factory,
String ghLoc)
Create the EncodingManager from the provided GraphHopper location.
|
static EncodingManager |
create(FlagEncoderFactory factory,
String flagEncodersStr,
int bytesForEdgeFlags) |
static EncodingManager |
create(List<? extends FlagEncoder> flagEncoders)
Instantiate manager with the given list of encoders.
|
static EncodingManager |
create(List<? extends FlagEncoder> flagEncoders,
int bytesForEdgeFlags) |
static EncodingManager |
create(String flagEncodersStr)
Instantiate manager with the given list of encoders.
|
static EncodingManager |
create(String flagEncodersStr,
int bytesForEdgeFlags) |
static EncodingManager.Builder |
createBuilder(FlagEncoderFactory factory,
String flagEncodersStr,
int bytesForEdgeFlags) |
IntsRef |
createEdgeFlags() |
boolean |
equals(Object obj) |
List<FlagEncoder> |
fetchEdgeEncoders()
The returned list is never empty.
|
IntsRef |
flagsDefault(boolean forward,
boolean backward) |
List<BooleanEncodedValue> |
getAccessEncFromNodeFlags(long importNodeFlags) |
BooleanEncodedValue |
getBooleanEncodedValue(String key) |
int |
getBytesForFlags() |
DecimalEncodedValue |
getDecimalEncodedValue(String key) |
<T extends EncodedValue> |
getEncodedValue(String key,
Class<T> encodedValueType) |
FlagEncoder |
getEncoder(String name) |
<T extends Enum> |
getEnumEncodedValue(String key,
Class<T> type) |
IntEncodedValue |
getIntEncodedValue(String key) |
static String |
getKey(FlagEncoder encoder,
String str)
Until we have a proper key-string class we create all keys through this function
|
String |
getPreferredLanguage() |
long |
handleNodeTags(ReaderNode node)
Analyze tags on osm node.
|
long |
handleRelationTags(long oldRelationFlags,
ReaderRelation relation) |
IntsRef |
handleWayTags(ReaderWay way,
EncodingManager.AcceptWay acceptWay,
long relationFlags)
Processes way properties of different kind to determine speed and direction.
|
boolean |
hasEncoder(String encoder) |
int |
hashCode() |
boolean |
isEnableInstructions() |
boolean |
needsTurnCostsSupport() |
static EncodingManager.Builder |
start()
Starts the build process of an EncodingManager
|
String |
toDetailsString() |
String |
toString() |
public static final String ROUNDABOUT
public static EncodingManager create(String flagEncodersStr)
flagEncodersStr
- comma delimited list of encoders. The order does not matter.public static EncodingManager create(String flagEncodersStr, int bytesForEdgeFlags)
public static EncodingManager create(FlagEncoderFactory factory, String flagEncodersStr, int bytesForEdgeFlags)
public static EncodingManager.Builder createBuilder(FlagEncoderFactory factory, String flagEncodersStr, int bytesForEdgeFlags)
public static EncodingManager create(FlagEncoder... flagEncoders)
flagEncoders
- comma delimited list of encoders. The order does not matter.public static EncodingManager create(List<? extends FlagEncoder> flagEncoders)
flagEncoders
- comma delimited list of encoders. The order does not matter.public static EncodingManager create(List<? extends FlagEncoder> flagEncoders, int bytesForEdgeFlags)
public static EncodingManager create(FlagEncoderFactory factory, String ghLoc)
public static EncodingManager.Builder start()
public int getBytesForFlags()
public boolean isEnableInstructions()
public String getPreferredLanguage()
public boolean hasEncoder(String encoder)
hasEncoder
in interface EncodedValueLookup
public FlagEncoder getEncoder(String name)
public boolean acceptWay(ReaderWay way, EncodingManager.AcceptWay acceptWay)
public long handleRelationTags(long oldRelationFlags, ReaderRelation relation)
public IntsRef handleWayTags(ReaderWay way, EncodingManager.AcceptWay acceptWay, long relationFlags)
relationFlags
- The preprocessed relation flags is used to influence the way properties.public String toDetailsString()
public IntsRef createEdgeFlags()
public IntsRef flagsDefault(boolean forward, boolean backward)
public long handleNodeTags(ReaderNode node)
public void applyWayTags(ReaderWay way, EdgeIteratorState edge)
public List<FlagEncoder> fetchEdgeEncoders()
public boolean needsTurnCostsSupport()
public List<BooleanEncodedValue> getAccessEncFromNodeFlags(long importNodeFlags)
public BooleanEncodedValue getBooleanEncodedValue(String key)
getBooleanEncodedValue
in interface EncodedValueLookup
public IntEncodedValue getIntEncodedValue(String key)
getIntEncodedValue
in interface EncodedValueLookup
public DecimalEncodedValue getDecimalEncodedValue(String key)
getDecimalEncodedValue
in interface EncodedValueLookup
public <T extends Enum> EnumEncodedValue<T> getEnumEncodedValue(String key, Class<T> type)
getEnumEncodedValue
in interface EncodedValueLookup
public <T extends EncodedValue> T getEncodedValue(String key, Class<T> encodedValueType)
getEncodedValue
in interface EncodedValueLookup
public static final String getKey(FlagEncoder encoder, String str)
Copyright © 2012–2019. All rights reserved.