public class CarFlagEncoder extends AbstractFlagEncoder
TurnCostEncoder.NoTurnCostsEncoder| Modifier and Type | Field and Description |
|---|---|
protected int |
badSurfaceSpeed |
protected Set<String> |
badSurfaceSpeedMap |
protected Map<String,Integer> |
defaultSpeedMap
A map which associates string to speed.
|
protected int |
destinationSpeed |
protected boolean |
speedTwoDirections |
protected Map<String,Integer> |
trackTypeSpeedMap |
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 |
|---|
CarFlagEncoder() |
CarFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts) |
CarFlagEncoder(PMap properties) |
CarFlagEncoder(String propertiesStr) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
applyBadSurfaceSpeed(ReaderWay way,
double speed) |
void |
createEncodedValues(List<EncodedValue> registerNewEncodedValue,
String prefix,
int index)
Define the place of the speedBits in the edge flags for car.
|
EncodingManager.Access |
getAccess(ReaderWay way)
Decide whether a way is routable for a given mode of travel.
|
protected double |
getSpeed(ReaderWay way) |
int |
getVersion() |
String |
getWayInfo(ReaderWay way) |
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 accept,
long relationFlags)
Analyze properties of a way and create the edge flags.
|
protected boolean |
isBackwardOneway(ReaderWay way)
make sure that isOneway is called before
|
protected boolean |
isForwardOneway(ReaderWay way)
make sure that isOneway is called before
|
protected boolean |
isOneway(ReaderWay way) |
String |
toString() |
applyMaxSpeed, applyWayTags, defineNodeBits, defineRelationBits, defineTurnBits, equals, flagsDefault, getAccessEnc, getAnnotation, getAverageSpeedEnc, getBooleanEncodedValue, getConditionalTagInspector, getDecimalEncodedValue, getEncodedValue, getEnumEncodedValue, getFerrySpeed, getIntEncodedValue, getMaxSpeed, getMaxSpeed, getPropertiesString, getTurnCost, getTurnFlags, handleNodeTags, hasEncoder, hashCode, init, isBlockFords, isRegistered, isTurnRestricted, parseSpeed, setBlockByDefault, setBlockFords, setConditionalTagInspector, setEncodedValueLookup, setRegistered, setSpeed, supportsprotected int badSurfaceSpeed
protected int destinationSpeed
protected boolean speedTwoDirections
public CarFlagEncoder()
public CarFlagEncoder(PMap properties)
public CarFlagEncoder(String propertiesStr)
public CarFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts)
public int getVersion()
public void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index)
createEncodedValues in class AbstractFlagEncoderprotected double getSpeed(ReaderWay way)
public EncodingManager.Access getAccess(ReaderWay way)
AbstractFlagEncodergetAccess in class AbstractFlagEncoderpublic long handleRelationTags(long oldRelationFlags,
ReaderRelation relation)
AbstractFlagEncoderhandleRelationTags in class AbstractFlagEncoderpublic IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, EncodingManager.Access accept, long relationFlags)
AbstractFlagEncoderhandleWayTags in class AbstractFlagEncoderprotected boolean isBackwardOneway(ReaderWay way)
protected boolean isForwardOneway(ReaderWay way)
protected boolean isOneway(ReaderWay way)
protected double applyBadSurfaceSpeed(ReaderWay way, double speed)
way - needed to retrieve tagsspeed - speed guessed e.g. from the road type or other tagsCopyright © 2012–2019. All rights reserved.