public class DataFlagEncoder extends AbstractFlagEncoder
Currently limited to motor vehicle but later could handle different modes like foot or bike too.
Modifier and Type | Class and Description |
---|---|
static class |
DataFlagEncoder.WeightingConfig |
TurnCostEncoder.NoTurnCostsEncoder
absoluteBarriers, accessEnc, encodedValueLookup, ferries, intendedValues, LONG_TRIP_FERRY_SPEED, maxPossibleSpeed, oneways, potentialBarriers, properties, restrictedValues, restrictions, roundaboutEnc, SHORT_TRIP_FERRY_SPEED, speedBits, speedDefault, speedEncoder, speedFactor, UNKNOWN_DURATION_FERRY_SPEED
Constructor and Description |
---|
DataFlagEncoder() |
DataFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts) |
DataFlagEncoder(PMap properties) |
Modifier and Type | Method and Description |
---|---|
void |
createEncodedValues(List<EncodedValue> registerNewEncodedValue,
String prefix,
int index)
Defines bits used for edge flags used for access, speed etc.
|
DataFlagEncoder.WeightingConfig |
createWeightingConfig(PMap pMap)
This method creates a Config map out of the PMap.
|
protected void |
flagsDefault(IntsRef edgeFlags,
boolean forward,
boolean backward)
Sets default flags with specified access.
|
EncodingManager.Access |
getAccess(ReaderWay way)
Decide whether a way is routable for a given mode of travel.
|
InstructionAnnotation |
getAnnotation(IntsRef flags,
Translation tr) |
double |
getMaxPossibleSpeed() |
double |
getMaxSpeed() |
protected double |
getMaxSpeed(ReaderWay way) |
int |
getVersion() |
long |
handleRelationTags(long oldRelationFlags,
ReaderRelation relation)
Analyze the properties of a relation and create the routing flags for the second read step.
|
IntsRef |
handleWayTags(IntsRef edgeFlags,
ReaderWay way,
EncodingManager.Access access,
long relationFlags)
Analyze properties of a way and create the edge flags.
|
protected void |
setSpeed(boolean reverse,
IntsRef edgeFlags,
double speed)
Most use cases do not require this method.
|
boolean |
supports(Class<?> feature)
Returns true if the feature class is supported like TurnWeighting or PriorityWeighting.
|
String |
toString() |
applyMaxSpeed, applyWayTags, defineNodeBits, defineRelationBits, defineTurnBits, equals, getAccessEnc, getAverageSpeedEnc, getBooleanEncodedValue, getConditionalTagInspector, getDecimalEncodedValue, getEncodedValue, getEnumEncodedValue, getFerrySpeed, getIntEncodedValue, getPropertiesString, getTurnCost, getTurnFlags, handleNodeTags, hasEncodedValue, hashCode, init, isBlockFords, isRegistered, isTurnRestricted, parseSpeed, setBlockByDefault, setBlockFords, setConditionalTagInspector, setEncodedValueLookup, setRegistered
public DataFlagEncoder()
public DataFlagEncoder(PMap properties)
public DataFlagEncoder(int speedBits, double speedFactor, int maxTurnCosts)
public void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index)
AbstractFlagEncoder
createEncodedValues
in class AbstractFlagEncoder
protected void flagsDefault(IntsRef edgeFlags, boolean forward, boolean backward)
AbstractFlagEncoder
flagsDefault
in class AbstractFlagEncoder
public long handleRelationTags(long oldRelationFlags, ReaderRelation relation)
AbstractFlagEncoder
handleRelationTags
in class AbstractFlagEncoder
public EncodingManager.Access getAccess(ReaderWay way)
AbstractFlagEncoder
getAccess
in class AbstractFlagEncoder
public IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, EncodingManager.Access access, long relationFlags)
AbstractFlagEncoder
handleWayTags
in class AbstractFlagEncoder
protected void setSpeed(boolean reverse, IntsRef edgeFlags, double speed)
AbstractFlagEncoder
setSpeed
in class AbstractFlagEncoder
protected double getMaxSpeed(ReaderWay way)
getMaxSpeed
in class AbstractFlagEncoder
public double getMaxSpeed()
getMaxSpeed
in interface FlagEncoder
getMaxSpeed
in class AbstractFlagEncoder
public double getMaxPossibleSpeed()
public boolean supports(Class<?> feature)
FlagEncoder
supports
in interface FlagEncoder
supports
in class AbstractFlagEncoder
public InstructionAnnotation getAnnotation(IntsRef flags, Translation tr)
getAnnotation
in interface FlagEncoder
getAnnotation
in class AbstractFlagEncoder
public int getVersion()
public DataFlagEncoder.WeightingConfig createWeightingConfig(PMap pMap)
Copyright © 2012–2019. All rights reserved.