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 Map<String,Integer> |
trackTypeSpeedMap |
absoluteBarriers, acceptBit, backwardBit, directionBitMask, edgeInExplorer, edgeOutExplorer, ferries, ferryBit, forwardBit, intendedValues, K_BACKWARD, K_FORWARD, LONG_TRIP_FERRY_SPEED, maxPossibleSpeed, oneways, potentialBarriers, properties, restrictedValues, restrictions, roundaboutBit, SHORT_TRIP_FERRY_SPEED, speedBits, speedEncoder, speedFactor, UNKNOWN_DURATION_FERRY_SPEED
K_ROUNDABOUT
Constructor and Description |
---|
CarFlagEncoder() |
CarFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts) |
CarFlagEncoder(PMap properties) |
CarFlagEncoder(String propertiesStr) |
Modifier and Type | Method and Description |
---|---|
long |
acceptWay(ReaderWay way)
Decide whether a way is routable for a given mode of travel.
|
protected double |
applyBadSurfaceSpeed(ReaderWay way,
double speed) |
int |
defineWayBits(int index,
int shift)
Define the place of the speedBits in the edge flags for car.
|
protected double |
getSpeed(ReaderWay way) |
int |
getVersion() |
String |
getWayInfo(ReaderWay way) |
long |
handleRelationTags(ReaderRelation relation,
long oldRelationFlags)
Analyze the properties of a relation and create the routing flags for the second read step.
|
long |
handleWayTags(ReaderWay way,
long allowed,
long relationFlags)
Analyze properties of a way and create the routing 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, getAnnotation, getConditionalTagInspector, getDouble, getFerrySpeed, getLong, getMaxSpeed, getMaxSpeed, getPropertiesString, getReverseSpeed, getSpeed, getTurnCost, getTurnFlags, handleNodeTags, hashCode, init, isAccept, isBackward, isBlockFords, isBool, isFerry, isForward, isRegistered, isTurnRestricted, parseSpeed, reverseFlags, setAccess, setBlockByDefault, setBlockFords, setBool, setConditionalTagInspector, setDouble, setLong, setLowSpeed, setProperties, setRegistered, setReverseSpeed, setSpeed, supports
protected int badSurfaceSpeed
protected int destinationSpeed
public CarFlagEncoder()
public CarFlagEncoder(PMap properties)
public CarFlagEncoder(String propertiesStr)
public CarFlagEncoder(int speedBits, double speedFactor, int maxTurnCosts)
public int getVersion()
public int defineWayBits(int index, int shift)
defineWayBits
in class AbstractFlagEncoder
shift
- bit offset for the first bit used by this encoderprotected double getSpeed(ReaderWay way)
public long acceptWay(ReaderWay way)
AbstractFlagEncoder
acceptWay
in class AbstractFlagEncoder
public long handleRelationTags(ReaderRelation relation, long oldRelationFlags)
AbstractFlagEncoder
handleRelationTags
in class AbstractFlagEncoder
public long handleWayTags(ReaderWay way, long allowed, long relationFlags)
AbstractFlagEncoder
handleWayTags
in class AbstractFlagEncoder
protected 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–2018. All rights reserved.