public class StreetEdge extends Edge implements Cloneable
Edge.ValidVertexTypes
Modifier and Type | Field and Description |
---|---|
static int |
ANY_PLATFORM_MASK |
protected float |
bicycleSafetyFactor
bicycleSafetyWeight = length * bicycleSafetyFactor.
|
static int |
CLASS_CROSSING |
static int |
CLASS_LINK |
static int |
CLASS_OTHER_PLATFORM |
static int |
CLASS_OTHERPATH |
static int |
CLASS_STREET |
static int |
CLASS_TRAIN_PLATFORM |
static int |
CROSSING_CLASS_MASK |
static float |
DEFAULT_CAR_SPEED |
long |
wayId
The OSM way ID from whence this came - needed to reference traffic data
|
Constructor and Description |
---|
StreetEdge(StreetVertex v1,
StreetVertex v2,
org.locationtech.jts.geom.LineString geometry,
I18NString name,
double length,
StreetTraversalPermission permission,
boolean back) |
StreetEdge(StreetVertex v1,
StreetVertex v2,
org.locationtech.jts.geom.LineString geometry,
String name,
double length,
StreetTraversalPermission permission,
boolean back) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateLengthFromGeometry()
calculate the length of this street segement from its geometry
|
double |
calculateSpeed(RoutingRequest options,
TraverseMode traverseMode,
long timeMillis)
Calculate the speed appropriately given the RoutingRequest and traverseMode and the current wall clock time.
|
boolean |
canTraverse(TraverseModeSet modes)
Checks permissions of the street edge if specified modes are allowed to travel.
|
boolean |
canTraverseIncludingBarrier(TraverseMode mode)
This checks if start or end vertex is bollard
If it is it creates intersection of street edge permissions
and from/to barriers.
|
boolean |
canTurnOnto(Edge e,
State state,
TraverseMode mode) |
StreetEdge |
clone() |
float |
getBicycleSafetyFactor() |
float |
getCarSpeed() |
double |
getDistance() |
PackedCoordinateSequence |
getElevationProfile() |
long |
getEndOsmNodeId()
Get the ending OSM node ID of this edge.
|
org.locationtech.jts.geom.LineString |
getGeometry() |
int |
getInAngle()
Return the azimuth of the first segment in this edge in integer degrees clockwise from South.
|
float |
getMaxSlope() |
String |
getName()
Gets english localized name
|
String |
getName(Locale locale)
Gets wanted localization
|
int |
getOutAngle()
Return the azimuth of the last segment in this edge in integer degrees clockwise from South.
|
StreetTraversalPermission |
getPermission() |
I18NString |
getRawName()
Gets non-localized I18NString (Used when splitting edges)
|
double |
getSlopeSpeedEffectiveLength() |
double |
getSlopeWalkSpeedEffectiveLength() |
double |
getSlopeWorkCostEffectiveLength() |
long |
getStartOsmNodeId()
Get the starting OSM node ID of this edge.
|
int |
getStreetClass() |
protected List<TurnRestriction> |
getTurnRestrictions(Graph graph) |
boolean |
hasBogusName() |
boolean |
isBack()
Marks that this edge is the reverse of the one defined in the source
data.
|
boolean |
isElevationFlattened() |
boolean |
isNoThruTraffic() |
boolean |
isRoundabout()
Edges are not roundabouts by default.
|
boolean |
isSlopeOverride() |
boolean |
isStairs()
This street is a staircase
|
boolean |
isWheelchairAccessible() |
void |
setBack(boolean back) |
void |
setBicycleSafetyFactor(float bicycleSafetyFactor) |
void |
setCarSpeed(float carSpeed) |
void |
setHasBogusName(boolean hasBogusName) |
void |
setName(I18NString name) |
void |
setNoThruTraffic(boolean noThruTraffic) |
void |
setPermission(StreetTraversalPermission permission) |
void |
setRoundabout(boolean roundabout) |
void |
setSlopeOverride(boolean slopeOverride) |
void |
setStairs(boolean stairs) |
void |
setStreetClass(int streetClass) |
void |
setWheelchairAccessible(boolean wheelchairAccessible) |
void |
shareData(StreetEdge reversedEdge) |
P2<StreetEdge> |
split(SplitterVertex v,
boolean destructive)
Split this street edge and return the resulting street edges
|
double |
timeLowerBound(RoutingRequest options)
Returns a lower bound on traversal time given the routing options.
|
String |
toString() |
State |
traverse(State s0)
Traverse this edge.
|
double |
weightLowerBound(RoutingRequest options)
Returns a lower bound on edge weight given the routing options.
|
getAzimuth, getDirection, getDisplayGeometry, getFromVertex, getId, getToVertex, getTrip, getValidVertexTypes, hashCode, isEquivalentTo, isPartial, isReverseOf, optimisticTraverse, vertexTypesValid
public static final int CLASS_STREET
public static final int CLASS_CROSSING
public static final int CLASS_OTHERPATH
public static final int CLASS_OTHER_PLATFORM
public static final int CLASS_TRAIN_PLATFORM
public static final int ANY_PLATFORM_MASK
public static final int CROSSING_CLASS_MASK
public static final int CLASS_LINK
public static final float DEFAULT_CAR_SPEED
protected float bicycleSafetyFactor
public long wayId
public StreetEdge(StreetVertex v1, StreetVertex v2, org.locationtech.jts.geom.LineString geometry, I18NString name, double length, StreetTraversalPermission permission, boolean back)
public StreetEdge(StreetVertex v1, StreetVertex v2, org.locationtech.jts.geom.LineString geometry, String name, double length, StreetTraversalPermission permission, boolean back)
public boolean canTraverse(TraverseModeSet modes)
modes
- public boolean canTraverseIncludingBarrier(TraverseMode mode)
canTraverse(RoutingRequest, TraverseMode)
mode
- public PackedCoordinateSequence getElevationProfile()
public boolean isElevationFlattened()
public float getMaxSlope()
public double getDistance()
getDistance
in class Edge
public double calculateSpeed(RoutingRequest options, TraverseMode traverseMode, long timeMillis)
public double weightLowerBound(RoutingRequest options)
Edge
weightLowerBound
in class Edge
public double timeLowerBound(RoutingRequest options)
Edge
timeLowerBound
in class Edge
public double getSlopeSpeedEffectiveLength()
public double getSlopeWorkCostEffectiveLength()
public double getSlopeWalkSpeedEffectiveLength()
public void setBicycleSafetyFactor(float bicycleSafetyFactor)
public float getBicycleSafetyFactor()
public StreetEdge clone()
public boolean canTurnOnto(Edge e, State state, TraverseMode mode)
public I18NString getRawName()
public String getName(Locale locale)
Edge
public void setName(I18NString name)
public org.locationtech.jts.geom.LineString getGeometry()
getGeometry
in class Edge
public void shareData(StreetEdge reversedEdge)
public boolean isWheelchairAccessible()
public void setWheelchairAccessible(boolean wheelchairAccessible)
public StreetTraversalPermission getPermission()
public void setPermission(StreetTraversalPermission permission)
public int getStreetClass()
public void setStreetClass(int streetClass)
public boolean isBack()
public void setBack(boolean back)
public boolean isRoundabout()
Edge
isRoundabout
in class Edge
public void setRoundabout(boolean roundabout)
public boolean hasBogusName()
hasBogusName
in class Edge
public void setHasBogusName(boolean hasBogusName)
public boolean isNoThruTraffic()
public void setNoThruTraffic(boolean noThruTraffic)
public boolean isStairs()
public void setStairs(boolean stairs)
public float getCarSpeed()
public void setCarSpeed(float carSpeed)
public boolean isSlopeOverride()
public void setSlopeOverride(boolean slopeOverride)
public int getInAngle()
public int getOutAngle()
protected List<TurnRestriction> getTurnRestrictions(Graph graph)
protected void calculateLengthFromGeometry()
public P2<StreetEdge> split(SplitterVertex v, boolean destructive)
public long getStartOsmNodeId()
public long getEndOsmNodeId()
Copyright © 2019. All rights reserved.