1

Can someone explain/point to documentation that explains the 'segmentRef' attribute that gets returned by the Here Routing API v8 when spans="segmentRef". An example of what gets returned is shown below. The middle part seems to be the topologyID but I can't figure out the rest. Thanks.

$0:321534451:$1:457679505#-0..0.7675126869621484
realdrive
  • 36
  • 4

3 Answers3

0

In v8, segmentRef is returned instead of PVID. spans conceptually replace link attributes.

Please refer the screenshots of supported link attributes.

enter image description here

enter image description here

For more details please refer the below api guide.

https://developer.here.com/documentation/routing-api/migration_guide/index.html

0

segmentRef is a parameter used in the HERE Maps API to identify a specific segment of a route. The segmentRef parameter is used to reference a specific segment within the route, and can be used in conjunction with the HERE Routing API to retrieve information about that segment. The information that can be retrieved for a segment includes details such as the start and end coordinates, the length of the segment, and the type of road along which the segment is located.

The segmentRef parameter is typically used in conjunction with other parameters, such as origin and destination, to define the overall route and retrieve information about specific segments within that route.

nvipash
  • 91
  • 1
  • 9
0

You can split it into two parts:

The first part: $0:321534451:$1:457679505)

It finds the corresponding catalogs, layers, and segment info.

Second one: "#-0..0.7675126869621484" (Topology segments metadata)

direction format:

* This is an undirected or bidirectional segment.
+ This is a directed segment following the pre-defined segment direction (forward direction). The pre-defined segment direction is the one going from the start node to the end node as defined in the source catalog.
- This is a directed segment following the opposite direction (backward direction).
? The segment has an unknown direction. 

range format: {startOffset}..{endOffset}

point format: offset

$0:321534451:$1:45767950 -->$0(catalog), 321534451(PartitionID),$1(Layer), 45767950(segment) I don't think you have to worry about this part.

-0..0.7675126869621484 --> backward direction, startoffset 0, endofseet 0.7675126869621484

Yang
  • 21
  • 3