public class CarFlagEncoder extends AbstractFlagEncoder
| 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 Map<String,Integer> |
trackTypeSpeedMap |
absoluteBarriers, accessEnc, avgSpeedEnc, encodedValueLookup, ferries, intendedValues, LONG_TRIP_FERRY_SPEED, maxPossibleSpeed, oneways, potentialBarriers, restrictedValues, restrictions, roundaboutEnc, SHORT_TRIP_FERRY_SPEED, speedBits, speedDefault, speedFactor, UNKNOWN_DURATION_FERRY_SPEED| Constructor and Description |
|---|
CarFlagEncoder() |
CarFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts) |
CarFlagEncoder(PMap properties) |
| 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) |
TransportationMode |
getTransportationMode() |
int |
getVersion() |
IntsRef |
handleWayTags(IntsRef edgeFlags,
ReaderWay way,
EncodingManager.Access accept)
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) |
CarFlagEncoder |
setSpeedTwoDirections(boolean value) |
String |
toString() |
applyMaxSpeed, applyWayTags, blockBarriersByDefault, blockFords, blockPrivate, defineNodeBits, equals, flagsDefault, getAccessEnc, getAllShared, getAverageSpeedEnc, getBooleanEncodedValue, getConditionalTagInspector, getDecimalEncodedValue, getEncodedValue, getEnumEncodedValue, getFerrySpeed, getIntEncodedValue, getMaxSpeed, getMaxSpeed, getMaxTurnCosts, getPropertiesString, handleNodeTags, hasEncodedValue, hashCode, init, isBlockFords, isRegistered, parseSpeed, setConditionalTagInspector, setEncodedValueLookup, setSpeed, supports, supportsTurnCostspublic CarFlagEncoder()
public CarFlagEncoder(PMap properties)
public CarFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts)
public CarFlagEncoder setSpeedTwoDirections(boolean value)
public TransportationMode getTransportationMode()
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 IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, EncodingManager.Access accept)
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–2020. All rights reserved.