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.NoTurnCostsEncoderabsoluteBarriers, 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, setRegisteredpublic DataFlagEncoder()
public DataFlagEncoder(PMap properties)
public DataFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts)
public void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index)
AbstractFlagEncodercreateEncodedValues in class AbstractFlagEncoderprotected void flagsDefault(IntsRef edgeFlags, boolean forward, boolean backward)
AbstractFlagEncoderflagsDefault in class AbstractFlagEncoderpublic long handleRelationTags(long oldRelationFlags,
ReaderRelation relation)
AbstractFlagEncoderhandleRelationTags in class AbstractFlagEncoderpublic EncodingManager.Access getAccess(ReaderWay way)
AbstractFlagEncodergetAccess in class AbstractFlagEncoderpublic IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, EncodingManager.Access access, long relationFlags)
AbstractFlagEncoderhandleWayTags in class AbstractFlagEncoderprotected void setSpeed(boolean reverse,
IntsRef edgeFlags,
double speed)
AbstractFlagEncodersetSpeed in class AbstractFlagEncoderprotected double getMaxSpeed(ReaderWay way)
getMaxSpeed in class AbstractFlagEncoderpublic double getMaxSpeed()
getMaxSpeed in interface FlagEncodergetMaxSpeed in class AbstractFlagEncoderpublic double getMaxPossibleSpeed()
public boolean supports(Class<?> feature)
FlagEncodersupports in interface FlagEncodersupports in class AbstractFlagEncoderpublic InstructionAnnotation getAnnotation(IntsRef flags, Translation tr)
getAnnotation in interface FlagEncodergetAnnotation in class AbstractFlagEncoderpublic int getVersion()
public DataFlagEncoder.WeightingConfig createWeightingConfig(PMap pMap)
Copyright © 2012–2019. All rights reserved.