SegmentData (API Reference)
Class SegmentData
Contains the requested information for a segment
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 TypeMethodDescriptionintGets the length of this segment in meters.Gets theOCMSegmentIdobject representing the the segment.Gets theGeoPolylineobject representing the polyline of this segment.Gets the list ofRailwayCrossing.Gets the list ofRoadSign.Gets theSegmentReferenceobject representing the the segment.getSpans()Gets the list ofSegmentSpanData.Gets the list ofTollPoint.Gets the list ofTrafficSignal.
-
Method Details
-
getOcmSegmentId
Gets the
OCMSegmentIdobject representing the the segment.- Returns:
The
OCMSegmentIdobject representing the segment
-
getSegmentReference
Gets the
SegmentReferenceobject representing the the segment.- Returns:
The
SegmentReferenceobject representing the segment
-
getPolyline
Gets the
GeoPolylineobject representing the polyline of this segment.- Returns:
The
GeoPolylineobject representing the polyline of this segment.
-
getLengthInMeters
public int getLengthInMeters()Gets the length of this segment in meters.
- Returns:
The length of this segment in meters. This information is based on map data. It can differ from the length of
getPolyline()due to approximations of the polyline.
-
getSpans
Gets the list of
SegmentSpanData.- Returns:
The list of
SegmentSpanDataof the given segment for the requested attributes Note: If no span attributes is requested, the list will be empty.
-
getTrafficSignals
Gets the list of
TrafficSignal.- Returns:
The list of
TrafficSignalof the given segment. Returns an empty list if no data is found. ReturnsnullifSegmentDataLoaderOptions.loadTrafficSignalsis set tofalse. TheTrafficSignalLocationindicates the location of a single traffic signal, which can be any combination of left, right and overhead. TheTrafficSignal.offsetInMetersis the location along the segment, while the traffic signal location have details on how the traffic signal is display/deploy in that specific location in the segment.
-
getRoadSigns
Gets the list of
RoadSign.Returns
nullifSegmentDataLoaderOptions.loadRoadSignsis set tofalse.- Returns:
The list of
RoadSignof the given segment.
-
getRailwayCrossings
Gets the list of
RailwayCrossing.- Returns:
The list of
RailwayCrossingof the given segment. Returns an empty list if no data is found. ReturnsnullifSegmentDataLoaderOptions.loadRailwayCrossingsis set tofalse.
-
getTollPoints
Gets the list of
TollPoint.- Returns:
The list of
TollPointof the given segment. Returns an empty list if no data is found. ReturnsnullifSegmentDataLoaderOptions.loadTollPointsis set tofalseor theSegmentDatais not initialized usingSegmentDataLoader.loadDirectedSegmentData(com.here.sdk.mapdata.DirectedOCMSegmentId, com.here.sdk.mapdata.SegmentDataLoaderOptions).
-