HERE Android SDK Developer's Guide

LaneInformation

The class LaneInformation is a member of com.here.android.mpa.guidance .

Class Summary

public final class LaneInformation

extends java.lang.Object

Gives information about a lane, e.g.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in LaneInformation
Nested Classes

public static final enumeration LaneInformation.CrossingRestriction

Crossing restriction to enter or exit a HOV lane.

public static final enumeration LaneInformation.Direction

All possible directions the lane leads.

public static final enumeration LaneInformation.MarkingType

Marking types for the divider and center marking.

public static final enumeration LaneInformation.RecommendationState

Recommendation for taking the lane according to the lane connectivity.

Method Summary

Table 2. Methods in LaneInformation
Methods

public MarkingType getCenterMarking ()

Gets the divider marking type for the center mark.

public CrossingRestriction getCrossingRestriction ()

Gets the crossing restriction of the lane.

public java.util.EnumSet <Direction> getDirections ()

Gets the directions of the lane as an EnumSet.

public MarkingType getDividerMarking ()

Gets the divider marking type for side marks.

public int getHeightRestriction ()

Gets the height restriction in cm.

public RecommendationState getRecommendationState ()

Gets the recommendation state of the lane according to the current route.

public int getSpeedLimit ()

Gets the speed limit on this lane in the positive lane direction in km/h.

public int getWidth ()

Gets the lane width in cm.

public boolean isAcceleration ()

Returns whether this is an acceleration lane.

public boolean isAuxLane ()

Returns whether this is an auxiliary lane.

public boolean isCenterTurn ()

Returns whether this is a center turn lane.

public boolean isDeceleration ()

Returns whether this is a deceleration lane.

public boolean isDriveableShoulder ()

Returns whether this is a drivable shoulder lane.

public boolean isExpress ()

Returns whether this is an express lane.

public boolean isHOV ()

Returns whether this is a high occupancy vehicle (HOV) lane.

public boolean isPassing ()

Returns whether this is a passing lane.

public boolean isRegular ()

Returns whether this is a regular lane (i.e.

public boolean isRegulatedAccess ()

Returns whether this is a regulated access lane.

public boolean isReversible ()

Returns whether this is a reversible lane.

public boolean isSlow ()

Returns whether this is a slow lane.

public boolean isSyntheticDirection ()

Gets whether the direction of the lane is synthetic.

public boolean isTruckParking ()

Returns whether this is a truck parking lane.

public boolean isTurn ()

Returns whether this is a turn lane.

Class Details

Gives information about a lane, e.g. its type, direction and recommendation state.

Method Details

public MarkingType getCenterMarking ()

Gets the divider marking type for the center mark.

Center markings are markings between lanes in opposite direction.

Returns:

The divider marking type for the center mark.

public CrossingRestriction getCrossingRestriction ()

Gets the crossing restriction of the lane. This indicates if it is illegal to enter or exit a lane.

Returns:

The crossing restriction of the lane.

public java.util.EnumSet <Direction> getDirections ()

Gets the directions of the lane as an EnumSet. The EnumSet holds all the directions the lane leads to.

The LaneInformation.Direction values are stored in bitmask form, so it is possible to convert them to a bitmask if needed using the following code (e.g. for indexing image resources):

       private long
convertDirectionToBitMask(EnumSet<Direction> directions) {
    long bitmask = 0;
    for (Direction dir : directions) {
      bitmask |= dir.value();
    }
    return bitmask;
  }               

Returns:

An EnumSet that has each direction the lane leads to.

See also:

LaneInformation.Direction

public MarkingType getDividerMarking ()

Gets the divider marking type for side marks.

Divider markings are markings between lanes of same direction

Returns:

The divider marking type for side marks.

public int getHeightRestriction ()

Gets the height restriction in cm.

Returns:

The height restriction in cm or zero if there is no restriction or it is unknown.

public RecommendationState getRecommendationState ()

Gets the recommendation state of the lane according to the current route.

If the map data does not provide connectivity information for this lane, then the RecommendationState is set to NOT_AVAILABLE.

Returns:

The recommendation state of the lane according to the current route.

public int getSpeedLimit ()

Gets the speed limit on this lane in the positive lane direction in km/h. Zero if the speed limit is not available. In the case of zero, the speed limit is the speed limit of the whole road (see RoadElement

Returns:

The speed limit on this lane in the positive lane direction in km/h (zero if not available).

public int getWidth ()

Gets the lane width in cm.

Returns:

The lane width in cm or zero if the lane width is not available.

public boolean isAcceleration ()

Returns whether this is an acceleration lane.

An acceleration lane (or merge lane) allows traffic entering a highway to accelerate to the speed of through traffic before merging with it.

Returns:

True if this lane is an acceleration lane. False otherwise.

public boolean isAuxLane ()

Returns whether this is an auxiliary lane.

An auxiliary lane is a lane other than a through lane, used to separate entering, exiting or turning traffic from the through traffic.

Returns:

True if this lane is an auxiliary lane. False otherwise.

public boolean isCenterTurn ()

Returns whether this is a center turn lane.

Center turn lane is a bidirectional turn lane located in the middle of a road that allows traffic in both directions to turn left (right for left side driving countries).

Returns:

True if this lane is a center turn lane. False otherwise.

public boolean isDeceleration ()

Returns whether this is a deceleration lane.

A deceleration lane is a lane adjacent to the primary road or street allowing drivers to pull out of the through lane and decelerate safely before turning off a surface street or exiting a freeway.

Returns:

True if this lane is a deceleration lane. False otherwise.

public boolean isDriveableShoulder ()

Returns whether this is a drivable shoulder lane.

A shoulder lane is reserved paved area on the side of the road (one or both sides) that are not generally used for driving, although it is possible under certain circumstances. Only shoulder lanes designated as a part-time driving lanes are included.

Returns:

True if this lane is a drivable shoulder lane. False otherwise.

public boolean isExpress ()

Returns whether this is an express lane.

Returns:

True if this lane is an express lane. False otherwise.

public boolean isHOV ()

Returns whether this is a high occupancy vehicle (HOV) lane.

A HOV lane (or carpool lane) is reserved for carpool usage. Carpool lane requires a minimum number of passengers in order for the car to use the carpool lane. HOV lanes may also be reserved for hybrids, motorcycles, alternate fuel, etc. HOV Lane may require a fee

Returns:

True if this lane is an HOV lane. False otherwise.

public boolean isPassing ()

Returns whether this is a passing lane.

Returns:

True if this lane is a passing lane. False otherwise.

public boolean isRegular ()

Returns whether this is a regular lane (i.e. the lane has no other type).

Regular lanes are lanes which have no specific use (i.e. they are not a special type such as HOV, reversible, etc.)

Returns:

True if this lane is a regular lane. False otherwise.

public boolean isRegulatedAccess ()

Returns whether this is a regulated access lane.

(Trucks only) A regulated access lane is a lane designated as a holding zone, used to regulate traffic using time intervals.

Returns:

True if this lane is a regulated access lane. False otherwise.

public boolean isReversible ()

Returns whether this is a reversible lane.

A reversible lane is a lane in which traffic may travel in either direction, depending on certain conditions (also known as a tidal flow lane).

Returns:

True if this lane is a reversible lane. False otherwise.

public boolean isSlow ()

Returns whether this is a slow lane.

Returns:

True if this lane is a slow lane. False otherwise.

public boolean isSyntheticDirection ()

Gets whether the direction of the lane is synthetic.

Synthetic directions are derived from the connectivity of the lane. Non-synthetic directions represent actual physical arrows printed on the lane.

Returns:

True if the direction is synthetic. False otherwise.

public boolean isTruckParking ()

Returns whether this is a truck parking lane.

Truck parking lanes are wide shoulder lane that maybe used for truck parking as well as for emergency.

Returns:

True if this lane is a truck parking lane. False otherwise.

public boolean isTurn ()

Returns whether this is a turn lane.

Turn lane is an extra lane that is used for making a turn in order not to disrupt ongoing traffic.

Returns:

True if this lane is a turn lane. False otherwise.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.