public final class RoadElement
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RoadElement.Attribute
Defined values for different road attributes
|
static class |
RoadElement.FormOfWay
Form of Way Types
|
static class |
RoadElement.PluralType
Plural type identifies when a Junction is made up of multiple Road Elements.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
java.util.EnumSet<RoadElement.Attribute> |
getAttributes()
Gets the road attributes.
|
float |
getDefaultSpeed()
Gets the default speed of the road element.
|
RoadElement.FormOfWay |
getFormOfWay()
Gets the form of way.
|
java.util.List<GeoCoordinate> |
getGeometry()
Returns the geometry of the road element.
|
double |
getGeometryLength()
Returns the length of the polyline associated with this
RoadElement in meters. |
Identifier |
getIdentifier()
Get the Identifier for this particular RoadElement.
|
int |
getNumberOfLanes()
Gets number of lanes in this road element.
|
long |
getPermanentDirectedLinkId()
The Permanent Link ID (stable across different map versions) of the
RoadElement
with travel direction: positive sign (+) means driving in the 'canonical' direction of the
road and negative sign (-) means driving against the 'canonical' direction of the road. |
long |
getPermanentLinkId()
Returns the Permanent Link ID (stable across different map versions) of the
RoadElement. |
RoadElement.PluralType |
getPluralType()
Gets the plural type of the road element.
|
static RoadElement |
getRoadElement(GeoCoordinate coordinate,
java.lang.String marcCode)
Get the
RoadElement of the current GeoCoordinate. |
static java.util.List<RoadElement> |
getRoadElements(GeoBoundingBox boundingBox,
java.lang.String marcCode)
Get the list of
RoadElement of the current GeoBoundingBox. |
java.lang.String |
getRoadName()
Gets the name of the road that contains this current road element, such as
"Still Creek Drive".
|
java.lang.String |
getRouteName()
Gets the route name of the road element.
|
float |
getSpeedLimit()
Gets the speed limit.
|
java.util.Date |
getStartTime()
Gets the (estimated) time at which this road element starts.
|
float |
getStaticSpeed()
Gets the static speed of the road element using only free-flow speeds.
|
java.util.List<TrafficSign> |
getTrafficSigns()
Returns list of the
TrafficSign for this road element. |
int |
hashCode() |
boolean |
isPedestrian()
Checks, if the road is allowed only for pedestrians.
|
boolean |
isPlural()
Tests if the road element is plural.
|
public static RoadElement getRoadElement(GeoCoordinate coordinate, java.lang.String marcCode)
RoadElement of the current GeoCoordinate. This method returns
null if the GeoCoordinate is invalid or there is no RoadElement
close enough to the GeoCoordinate.coordinate - The GeoCoordinate that defines the coordinate to retrieve
RoadElementmarcCode - The text for RoadElement corresponds to the language MARC code.RoadElement of the current GeoCoordinate.java.lang.IllegalArgumentException - If marcCode is an empty string.java.lang.NullPointerException - If coordinate is null or marcCode is null.public static java.util.List<RoadElement> getRoadElements(GeoBoundingBox boundingBox, java.lang.String marcCode)
RoadElement of the current GeoBoundingBox.boundingBox - The GeoBoundingBox that defines the area to retrieve RoadElementmarcCode - The text for RoadElement corresponds to the language MARC code.RoadElement of the current GeoBoundingBox.public java.util.EnumSet<RoadElement.Attribute> getAttributes()
RoadElement.Attributepublic RoadElement.FormOfWay getFormOfWay()
public boolean isPlural()
public RoadElement.PluralType getPluralType()
public java.lang.String getRoadName()
null or an empty string if the name is unknown,
such as when the road element is on an unnamed service alley.public java.lang.String getRouteName()
null string if the
route name is unknown.public float getSpeedLimit()
public float getDefaultSpeed()
public float getStaticSpeed()
public int getNumberOfLanes()
public boolean isPedestrian()
public java.util.Date getStartTime()
RouteOptions associated with this road
element, than the time is relative to the system time when the route calculation took place.
Otherwise, the times are relative to the specified departure time.null if not availableRouteOptions.setTime(Date, RouteOptions.TimeType)public double getGeometryLength()
RoadElement in meters.RoadElement in meters.public final java.util.List<GeoCoordinate> getGeometry()
GeoCoordinate that can be used to create a polyline.GeoCoordinatepublic Identifier getIdentifier()
Identifierpublic long getPermanentLinkId()
RoadElement. This property is unavailable when the public transport mode
RouteOptions.TransportMode.PUBLIC_TRANSPORT is used.
For all the other transport modes, it is available only in routes calculated with the online
connectivity mode.RoadElement.getPermanentDirectedLinkId()public long getPermanentDirectedLinkId()
RoadElement
with travel direction: positive sign (+) means driving in the 'canonical' direction of the
road and negative sign (-) means driving against the 'canonical' direction of the road.
Every road element has two endpoints. Starting from which end point the link is being
traversed? Each link has a geometry associated with it. The geometry gives the link
a 'canonical' direction: if you traverse the link in the direction the geometry is stored,
you are traveling in the positive direction. Otherwise, you are traveling in the negative
direction. The assigned 'canonical' direction is completely arbitrary and no assumption
should be made about it.
This property is unavailable when the public transport mode
RouteOptions.TransportMode.PUBLIC_TRANSPORT is used.
For all the other transport modes, it is available only in routes calculated with the online
connectivity mode.RoadElement.getPermanentLinkId()public java.util.List<TrafficSign> getTrafficSigns() throws DataNotReadyException
TrafficSign for this road element.TrafficSign. The empty list is returned if no traffic sign exists
at this RoadElement.DataNotReadyException - The map data for traffic signs is not loaded yet.java.lang.RuntimeException - Unexpected error.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object