Class Span

java.lang.Object
com.here.NativeBase
com.here.sdk.routing.Span

public final class Span extends NativeBase

A span is a part of the Section which is traversable or navigable. Each span usually has some geometry associated with it.

  • Method Details

    • getShieldText

      @NonNull public String getShieldText(@NonNull LocalizedRoadNumber roadNumber)

      Converts full route number to the value to be displayed on the road shield. The results are based on country code and state code of Span object and route type of passed road_number argument.

      Parameters:
      roadNumber -

      Route number to convert to shield text.

      Returns:

      Text on the road shield to display.

    • getGeometry

      @NonNull public GeoPolyline getGeometry()

      Gets the GeoPolyline object representing the polyline of this span.

      Returns:

      The GeoPolyline object representing the polyline of this span.

    • getLengthInMeters

      public int getLengthInMeters()

      Gets the length of this span in meters.

      Returns:

      The length of this span in meters.

    • getNoticeIndexes

      @NonNull public List<Integer> getNoticeIndexes()

      Gets the list of indexes to Section.getSectionNotices() the parent section owns. In case the list is not empty, the user must judge all the indexed SectionNotice's carefully before proceeding.

      Returns:

      The list of indexes to Section.getSectionNotices() the parent section owns. In case the list is not empty, the user must judge all the indexed SectionNotices carefully before proceeding.

    • getSegmentReference

      @NonNull public SegmentReference getSegmentReference()

      Gets the segment reference of this span.

      Returns:

      The segment reference of this span.

    • getTrafficIncidentIndexes

      @NonNull public List<Integer> getTrafficIncidentIndexes()

      The indexes of traffic incidents from the field Section.getTrafficIncidents() of the parent Section. Each matching incident takes at least a whole getGeometry(). The same incident can take other spans and an area out of the built route as well.

      Returns:

      The indexes of traffic incidents from the field Section.getTrafficIncidents() of the parent Section. Each matching incident takes at least a whole getGeometry(). The same incident can take other spans and an area out of the built route as well.

    • getSectionPolylineOffset

      public int getSectionPolylineOffset()

      Gets the position of the span inside the section's geometry, given as an offset. The span geometry starts from this offset and ends on the offset of the next span, both start offset point and end offset point being included in the span, because the spans' geometry share a point in the section's geometry.

      Returns:

      The position of the span inside the section's geometry, given as an offset. The span geometry starts from this offset and ends on the offset of the next span, both start offset point and end offset point being included in the span, because the spans' geometry share a point in the section's geometry.

    • getDynamicSpeedInfo

      @Nullable public DynamicSpeedInfo getDynamicSpeedInfo()

      The dynamic speed information on the span.

      Returns:

      The dynamic speed information on the span.

    • getStreetAttributes

      @NonNull public List<StreetAttributes> getStreetAttributes()

      The list of street attributes on the span.

      Returns:

      The list of street attributes on the span.

    • getCarAttributes

      @NonNull public List<AccessAttributes> getCarAttributes()

      The list of car access attributes on the span.

      Returns:

      The list of car access attributes on the span.

    • getTruckAttributes

      @NonNull public List<AccessAttributes> getTruckAttributes()

      The list of truck access attributes on the span.

      Returns:

      The list of truck access attributes on the span.

    • getScooterAttributes

      @NonNull public List<AccessAttributes> getScooterAttributes()

      The list of scooter access attributes on the span.

      Returns:

      The list of scooter access attributes on the span.

    • getWalkAttributes

      @NonNull public List<WalkAttributes> getWalkAttributes()

      The list of walk attributes on the span.

      Returns:

      The list of walk attributes on the span.

    • getStreetNames

      @NonNull public LocalizedTexts getStreetNames()

      The street names on the span.

      Returns:

      The street names on the span.

    • getRoadNumbers

      @NonNull public LocalizedRoadNumbers getRoadNumbers()

      Gets the road numbers on the span enriched with information specific to route numbers of a road such as I-10, US-50, or A3, and cardinal direction, if available, and a road level classification (RouteType).

      Returns:

      The road numbers on the span enriched with information specific to route numbers of a road such as I-10, US-50, or A3, and cardinal direction, if available, and a road level classification (RouteType).

    • getSpeedLimitInMetersPerSecond

      @Nullable public Double getSpeedLimitInMetersPerSecond()

      Gets the speed limit in meters per second on the span.

      Returns:

      The speed limit in meters per second on the span.

    • getConsumptionInKilowattHours

      @Nullable public Double getConsumptionInKilowattHours()

      Gets the power consumption in kilowatt per hour necessary to traverse the span.

      Returns:

      The power consumption in kilowatt per hour necessary to traverse the span.

    • getFunctionalRoadClass

      @Nullable public FunctionalRoadClass getFunctionalRoadClass()

      Gets the functional road class of the span.

      Returns:

      The functional road class of the span.

    • getDuration

      @NonNull public Duration getDuration()

      Gets the time duration necessary to traverse the span, using the speed provided in getDynamicSpeedInfo(). This duration takes also into consideration the delays caused by the traffic.

      Returns:

      The time duration necessary to traverse the span, using the speed provided in getDynamicSpeedInfo(). This duration takes also into consideration the delays caused by the traffic.

    • getBaseDuration

      @NonNull public Duration getBaseDuration()

      Gets the time duration necessary to traverse the span, using the speed provided in getDynamicSpeedInfo() without taking into consideration the delays caused by the traffic.

      Returns:

      The time duration necessary to traverse the span, using the speed provided in getDynamicSpeedInfo() without taking into consideration the delays caused by the traffic.

    • getCountryCode

      @Nullable public String getCountryCode()

      Gets the country code of the span. The value is null when no data is available.

      Returns:

      The country code of the span. The value is null when no data is available.

    • getStateCode

      @Nullable public String getStateCode()

      Gets the state code of the span. State code is available in some countries to denote principal subdivisions(provinces or states), e.g. in the United States, AK stands for Alaska and OH stands for Ohio. The format of state code can vary for different countries, take the United States as example, it consists of two alphabet letters. The value is null when no data is available.

      Returns:

      The state code of the span. State code is available in some countries to denote principal subdivisions(provinces or states), e.g. in the United States, AK stands for Alaska and OH stands for Ohio. The format of state code can vary for different countries, take the United States as example, it consists of two alphabet letters. The value is null when no data is available.

    • getNoThroughRestrictionsIndexes

      @NonNull public List<Integer> getNoThroughRestrictionsIndexes()

      Get the list of indexes to Section.getNoThroughRestrictions() the parent section owns. In case the list is not empty, the user must judge all the indexed Section.getNoThroughRestrictions()'s carefully before proceeding.

      Returns:

      The list of indexes to Section.getNoThroughRestrictions() the parent section owns. In case the list is not empty, the user must judge all the indexed sdk routing noThroughRestriction's carefully before proceeding.