public abstract class BikeCommonFlagEncoder extends AbstractFlagEncoder
TurnCostEncoder.NoTurnCostsEncoder| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
avoidHighwayTags |
static int |
K_UNPAVED
Reports whether this edge is unpaved.
|
protected HashSet<String> |
oppositeLanes |
protected Set<String> |
preferHighwayTags |
protected static int |
PUSHING_SECTION_SPEED |
protected HashSet<String> |
pushingSectionsHighways |
protected EncodedValue |
relationCodeEncoder |
protected Set<String> |
unpavedSurfaceTags |
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_SPEEDK_ROUNDABOUT| Modifier | Constructor and Description |
|---|---|
protected |
BikeCommonFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts) |
| Modifier and Type | Method and Description |
|---|---|
long |
acceptWay(ReaderWay way)
Decide whether a way is routable for a given mode of travel.
|
protected double |
applyMaxSpeed(ReaderWay way,
double speed)
Apply maxspeed: In contrast to the implementation of the AbstractFlagEncoder, we assume that
we can reach the maxspeed for bicycles in case that the road type speed is higher and not
just only 90%.
|
int |
defineRelationBits(int index,
int shift)
Defines the bits which are used for relation flags.
|
int |
defineWayBits(int index,
int shift)
Defines bits used for edge flags used for access, speed etc.
|
InstructionAnnotation |
getAnnotation(long flags,
Translation tr) |
double |
getDouble(long flags,
int key)
Returns arbitrary double value identified by the specified key.
|
protected int |
getHighwaySpeed(String key) |
int |
getVersion() |
protected int |
handlePriority(ReaderWay way,
double wayTypeSpeed,
int priorityFromRelation)
In this method we prefer cycleways or roads with designated bike access and avoid big roads
or roads with trams or pedestrian.
|
long |
handleRelationTags(ReaderRelation relation,
long oldRelationFlags)
Analyze the properties of a relation and create the routing flags for the second read step.
|
protected long |
handleSpeed(ReaderWay way,
double speed,
long encoded) |
long |
handleWayTags(ReaderWay way,
long allowed,
long relationFlags)
Analyze properties of a way and create the routing flags.
|
boolean |
isBool(long flags,
int key)
Returns arbitrary boolean value identified by the specified key.
|
void |
setAvoidSpeedLimit(int limit) |
long |
setBool(long flags,
int key,
boolean value) |
protected void |
setHighwaySpeed(String highway,
int speed) |
protected void |
setSpecificClassBicycle(String subkey) |
boolean |
supports(Class<?> feature)
Returns true if the feature class is supported like TurnWeighting or PriorityWeighting.
|
applyWayTags, defineNodeBits, defineTurnBits, equals, flagsDefault, getConditionalTagInspector, getFerrySpeed, getLong, getMaxSpeed, getMaxSpeed, getPropertiesString, getReverseSpeed, getSpeed, getTurnCost, getTurnFlags, handleNodeTags, hashCode, init, isAccept, isBackward, isBlockFords, isFerry, isForward, isRegistered, isTurnRestricted, parseSpeed, reverseFlags, setAccess, setBlockByDefault, setBlockFords, setConditionalTagInspector, setDouble, setLong, setLowSpeed, setProperties, setRegistered, setReverseSpeed, setSpeedpublic static final int K_UNPAVED
protected static final int PUSHING_SECTION_SPEED
protected EncodedValue relationCodeEncoder
protected BikeCommonFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts)
public int getVersion()
public int defineWayBits(int index,
int shift)
AbstractFlagEncoderdefineWayBits in class AbstractFlagEncodershift - bit offset for the first bit used by this encoderpublic int defineRelationBits(int index,
int shift)
AbstractFlagEncoderdefineRelationBits in class AbstractFlagEncoderpublic long acceptWay(ReaderWay way)
AbstractFlagEncoderacceptWay in class AbstractFlagEncoderpublic long handleRelationTags(ReaderRelation relation, long oldRelationFlags)
AbstractFlagEncoderhandleRelationTags in class AbstractFlagEncoderprotected double applyMaxSpeed(ReaderWay way, double speed)
applyMaxSpeed in class AbstractFlagEncoderway - needed to retrieve tagsspeed - speed guessed e.g. from the road type or other tagspublic long handleWayTags(ReaderWay way, long allowed, long relationFlags)
AbstractFlagEncoderhandleWayTags in class AbstractFlagEncoderpublic InstructionAnnotation getAnnotation(long flags, Translation tr)
getAnnotation in interface FlagEncodergetAnnotation in class AbstractFlagEncoderprotected int handlePriority(ReaderWay way, double wayTypeSpeed, int priorityFromRelation)
public long setBool(long flags,
int key,
boolean value)
setBool in interface FlagEncodersetBool in class AbstractFlagEncoderpublic boolean isBool(long flags,
int key)
FlagEncoderisBool in interface FlagEncoderisBool in class AbstractFlagEncoderpublic double getDouble(long flags,
int key)
FlagEncodergetDouble in interface FlagEncodergetDouble in class AbstractFlagEncoderprotected long handleSpeed(ReaderWay way, double speed, long encoded)
protected void setHighwaySpeed(String highway, int speed)
protected int getHighwaySpeed(String key)
public boolean supports(Class<?> feature)
FlagEncodersupports in interface FlagEncodersupports in class AbstractFlagEncoderpublic void setAvoidSpeedLimit(int limit)
protected void setSpecificClassBicycle(String subkey)
Copyright © 2012–2018. All rights reserved.