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 EncodedValueOld |
relationCodeEncoder |
protected boolean |
speedTwoDirections |
protected Set<String> |
unpavedSurfaceTags |
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| Modifier | Constructor and Description |
|---|---|
protected |
BikeCommonFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts) |
| Modifier and Type | Method and Description |
|---|---|
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%.
|
void |
createEncodedValues(List<EncodedValue> registerNewEncodedValue,
String prefix,
int index)
Defines bits used for edge flags used for access, speed etc.
|
int |
defineRelationBits(int index,
int shift)
Defines the bits which are used for relation flags.
|
EncodingManager.Access |
getAccess(ReaderWay way)
Decide whether a way is routable for a given mode of travel.
|
InstructionAnnotation |
getAnnotation(IntsRef edgeFlags,
Translation tr) |
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(long oldRelationFlags,
ReaderRelation relation)
Analyze the properties of a relation and create the routing flags for the second read step.
|
protected void |
handleSpeed(IntsRef edgeFlags,
ReaderWay way,
double speed) |
IntsRef |
handleWayTags(IntsRef edgeFlags,
ReaderWay way,
EncodingManager.Access access,
long relationFlags)
Analyze properties of a way and create the edge flags.
|
void |
setAvoidSpeedLimit(int limit) |
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, getAccessEnc, 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, setSpeedpublic static final int K_UNPAVED
protected static final int PUSHING_SECTION_SPEED
protected EncodedValueOld relationCodeEncoder
protected boolean speedTwoDirections
protected BikeCommonFlagEncoder(int speedBits,
double speedFactor,
int maxTurnCosts)
public int getVersion()
public void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index)
AbstractFlagEncodercreateEncodedValues in class AbstractFlagEncoderpublic int defineRelationBits(int index,
int shift)
AbstractFlagEncoderdefineRelationBits in class AbstractFlagEncoderpublic EncodingManager.Access getAccess(ReaderWay way)
AbstractFlagEncodergetAccess in class AbstractFlagEncoderpublic long handleRelationTags(long oldRelationFlags,
ReaderRelation relation)
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 IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, EncodingManager.Access access, long relationFlags)
AbstractFlagEncoderhandleWayTags in class AbstractFlagEncoderpublic InstructionAnnotation getAnnotation(IntsRef edgeFlags, Translation tr)
getAnnotation in interface FlagEncodergetAnnotation in class AbstractFlagEncoderprotected int handlePriority(ReaderWay way, double wayTypeSpeed, int priorityFromRelation)
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–2019. All rights reserved.