Span (API Reference)
Class Span
A span is a part of the Section which is traversable or navigable. Each span
usually has some geometry associated with it.
-
Method Summary
Modifier and TypeMethodDescriptionGets the time duration necessary to traverse the span, using the speed provided ingetDynamicSpeedInfo()without taking into consideration the delays caused by the traffic.The list of car access attributes on the span.Gets the power consumption in kilowatt per hour necessary to traverse the span.Gets the country code of the span.Gets the time duration necessary to traverse the span, using the speed provided ingetDynamicSpeedInfo().The dynamic speed information on the span.Gets the functional road class of the span.Gets theGeoPolylineobject representing the polyline of this span.intGets the length of this span in meters.Get the list of indexes toSection.getNoThroughRestrictions()the parent section owns.Gets the list of indexes toSection.getSectionNotices()the parent section owns.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).The list of scooter access attributes on the span.intGets the position of the span inside the section's geometry, given as an offset.Gets the segment reference of this span.getShieldText(LocalizedRoadNumber roadNumber) Converts full route number to the value to be displayed on the road shield.Gets the speed limit in meters per second on the span.Gets the state code of the span.The list of street attributes on the span.The street names on the span.The indexes of traffic incidents from the fieldSection.getTrafficIncidents()of the parentSection.The list of truck access attributes on the span.The list of walk attributes on the span.
-
Method Details
-
getShieldText
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
Spanobject and route type of passedroad_numberargument.- Parameters:
roadNumber-Route number to convert to shield text.
- Returns:
Text on the road shield to display.
-
getGeometry
Gets the
GeoPolylineobject representing the polyline of this span.- Returns:
The
GeoPolylineobject 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
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 indexedSectionNotice'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 indexedSectionNotices carefully before proceeding.
-
getSegmentReference
Gets the segment reference of this span.
- Returns:
The segment reference of this span.
-
getTrafficIncidentIndexes
The indexes of traffic incidents from the field
Section.getTrafficIncidents()of the parentSection. Each matching incident takes at least a wholegetGeometry(). 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 parentSection. Each matching incident takes at least a wholegetGeometry(). 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
The dynamic speed information on the span.
- Returns:
The dynamic speed information on the span.
-
getStreetAttributes
The list of street attributes on the span.
- Returns:
The list of street attributes on the span.
-
getCarAttributes
The list of car access attributes on the span.
- Returns:
The list of car access attributes on the span.
-
getTruckAttributes
The list of truck access attributes on the span.
- Returns:
The list of truck access attributes on the span.
-
getScooterAttributes
The list of scooter access attributes on the span.
- Returns:
The list of scooter access attributes on the span.
-
getWalkAttributes
The list of walk attributes on the span.
- Returns:
The list of walk attributes on the span.
-
getStreetNames
The street names on the span.
- Returns:
The street names on the span.
-
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
Gets the speed limit in meters per second on the span.
- Returns:
The speed limit in meters per second on the span.
-
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
Gets the functional road class of the span.
- Returns:
The functional road class of the span.
-
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
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
Gets the country code of the span. The value is
nullwhen no data is available.- Returns:
The country code of the span. The value is
nullwhen no data is available.
-
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
nullwhen 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
nullwhen no data is available.
-
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 indexedSection.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.
-