SegmentSpanData (API Reference)
Class SegmentSpanData
Contains attributes that are not necessarily constant on a full segment. A Span is a portion of a Segment where the requested attributes are constant.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Method Summary
Modifier and TypeMethodDescriptionGets theAdministrativeRulesfor the segment.Gets theAllowedTransportModesobject.Gets the average speed for this segment span.Gets theFunctionalRoadClassobject representing the polyline of this section.Gets the local road characteristics.Gets the average speed in the negative direction.Gets theSegmentSpeedLimitobject representing the speed limit of this segment span.Gets the physical attributes.Gets the average speed in the positive direction.Gets theSegmentSpeedLimitobject representing the speed limit of this segment span.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.Gets the road usages.intGets the length of this span in meters.Gets the list ofSegmentSpecialSpeedSituation.Gets theSegmentSpeedLimitobject representing the speed limit of this segment span.intGets the start offset in meters of the span.The street names on the span.Gets theTravelDirection.isUrban()Gets the urban attribute of the segment.
-
Method Details
-
getStartOffsetInMeters
public int getStartOffsetInMeters()Gets the start offset in meters of the span.
The offset in meters from the beginning of the segment to the start of the span in positive direction or from the end of the segment to the start of the span in negative direction.
- Returns:
Start offset.
-
getSpanLengthInMeters
public int getSpanLengthInMeters()Gets the length of this span in meters.
- Returns:
The length of this span in meters.
-
getTravelDirection
Gets the
TravelDirection.Gets the
TravelDirectionobject for the portion of the segment. ReturnsnullifSegmentDataLoaderOptions.loadTravelDirectionis set tofalse.- Returns:
The
TravelDirectionobject representing the allowed travel directions.
-
getAllowedTransportModes
Gets the
AllowedTransportModesobject.Returns
nullifSegmentDataLoaderOptions.loadTransportModesAccessis set tofalse.- Returns:
The
AllowedTransportModesobject representing the allowed transport modes.
-
getFunctionalRoadClass
Gets the
FunctionalRoadClassobject representing the polyline of this section.Returns
nullifSegmentDataLoaderOptions.loadFunctionalRoadClassis set tofalse.- Returns:
The
FunctionalRoadClassobject representing the polyline of this segment.
-
getPositiveDirectionSpeedLimit
Gets the
SegmentSpeedLimitobject representing the speed limit of this segment span.Returns
nullifSegmentDataLoaderOptions.loadSpeedLimitsis set tofalse.- Returns:
The
SegmentSpeedLimitobject representing the speed limit of this segment span in the positive tavel direction.
-
getNegativeDirectionSpeedLimit
Gets the
SegmentSpeedLimitobject representing the speed limit of this segment span.Returns
nullifSegmentDataLoaderOptions.loadSpeedLimitsis set tofalse.- Returns:
The
SegmentSpeedLimitobject representing the speed limit of this segment span in the negative travel direction.
-
getSpeedLimit
Gets the
SegmentSpeedLimitobject representing the speed limit of this segment span.Will be loaded if
SegmentDataLoaderOptions.loadSpeedLimitsistrue.- Returns:
The
SegmentSpeedLimitobject representing the speed limit of this segment span.
-
getPositiveDirectionBaseSpeedInMetersPerSecond
Gets the average speed in the positive direction.
Returns
nullifSegmentDataLoaderOptions.loadBaseSpeedsis set tofalse.- Returns:
The average speed expected for this segment in positive direction with a car or a similar vehicle.
-
getNegativeDirectionBaseSpeedInMetersPerSecond
Gets the average speed in the negative direction.
Returns
nullifSegmentDataLoaderOptions.loadBaseSpeedsis set tofalse.- Returns:
The average speed expected for this segment in negative direction with a car or a similar vehicle.
-
getBaseSpeedInMetersPerSecond
Gets the average speed for this segment span.
Will be loaded if
SegmentDataLoaderOptions.loadBaseSpeedsistrue.- Returns:
The average speed expected for this segment span with a car or a similar vehicle.
-
getLocalRoadCharacteristics
Gets the local road characteristics.
Returns
nullifSegmentDataLoaderOptions.loadLocalRoadCharacteristicsis set tofalse.- Returns:
The local road characteristics of the segment: frontage, parking lot road, or POI access road.
-
getStreetNames
The street names on the span.
Returns
nullifSegmentDataLoaderOptions.loadStreetNamesAndRoadNumbersis set tofalse.- 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.
Returns
nullifSegmentDataLoaderOptions.loadStreetNamesAndRoadNumbersis set tofalse.- 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.
-
getPhysicalAttributes
Gets the physical attributes.
Returns
nullifSegmentDataLoaderOptions.loadRoadAttributesis set tofalse.- Returns:
The physical attributes of the segment.
-
getRoadUsages
Gets the road usages.
Returns
nullifSegmentDataLoaderOptions.loadRoadAttributesis set tofalse.- Returns:
The road usages of the segment.
-
getAdministrativeRules
Gets the
AdministrativeRulesfor the segment.Returns
nullifSegmentDataLoaderOptions.loadAdministrativeRulesis set tofalse.- Returns:
The
AdministrativeRulesfor the segment, containing information about country code, state code, unit system, tolls, pre-trip planning and other administrative information.
-
isUrban
Gets the urban attribute of the segment.
Returns
nullifSegmentDataLoaderOptions.loadUrbanis set tofalse.- Returns:
The urban attribute of the segment.
-
getSpecialSpeedSituations
Gets the list of
SegmentSpecialSpeedSituation.Will be loaded if
SegmentDataLoaderOptions.loadSpecialSpeedSituationsistrue. Note: To get timezone offset and daylight saving time values for TimeRule, [sdk.mapdata.SegmentDataLoaderOptions.load_administrative_rules] must also be set totrue.- Returns:
The special speed situations of the segment.
-