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, 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_SPEEDK_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, supportsprotected 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 AbstractFlagEncodershift - bit offset for the first bit used by this encoderprotected double getSpeed(ReaderWay way)
public long acceptWay(ReaderWay way)
AbstractFlagEncoderacceptWay in class AbstractFlagEncoderpublic long handleRelationTags(ReaderRelation relation, long oldRelationFlags)
AbstractFlagEncoderhandleRelationTags in class AbstractFlagEncoderpublic long handleWayTags(ReaderWay way, long allowed, 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–2018. All rights reserved.