Hey,
thanks again for your response. Decoding waycategory is not a problem, it is more about duration on a certain waycategory.
I can NOT confirm this:
The waycategory summary
will then contain the durations for all segments together, but it is possible to tally up waycategory durations for specific segments manually.
waycategory summary only contains distance:
[{'value': 3.0, 'distance': 58139672.8, 'amount': 81.02}, {'value': 0.0, 'distance': 10734242.1, 'amount': 14.96}, {'value': 1.0, 'distance': 2628612.8, 'amount': 3.66}, {'value': 2.0, 'distance': 258568.3, 'amount': 0.36}]
I tried connecting the duration and the according way_points in the segments ‘steps’ with the waycategory values - but they do not match. Steps of one segment look like that:
[{'distance': 114.6, 'duration': 20.6, 'type': 11, 'instruction': 'Head north', 'name': '-', 'way_points': [0, 5]}, {'distance': 288.1, 'duration': 28.5, 'type': 1, 'instruction': 'Turn right onto Knaufstraße', 'name': 'Knaufstraße', 'way_points': [5, 17]}, {'distance': 3626.0, 'duration': 273.0, 'type': 5, 'instruction': 'Turn slight right onto B320', 'name': 'B320', 'way_points': [17, 115]}, {'distance': 54983.9, 'duration': 2679.3, 'type': 13, 'instruction': 'Keep right onto Ennstal-Bundesstraße, B320', 'name': 'Ennstal-Bundesstraße, B320', 'way_points': [115, 675]}, {'distance': 11065.1, 'duration': 531.1, 'type': 12, 'instruction': 'Keep left onto Pyhrn Autobahn, A9', 'name': 'Pyhrn Autobahn, A9', 'way_points': [675, 780]}, {'distance': 800.7, 'duration': 64.1, 'type': 13, 'instruction': 'Keep right', 'name': '-', 'way_points': [780, 804]}, {'distance': 49.6, 'duration': 4.0, 'type': 12, 'instruction': 'Keep left', 'name': '-', 'way_points': [804, 807]}, {'distance': 102057.2, 'duration': 4915.0, 'type': 13, 'instruction': 'Keep right', 'name': '-', 'way_points': [807, 2104]}, {'distance': 56143.4, 'duration': 2784.5, 'type': 12, 'instruction': 'Keep left onto S6', 'name': 'S6', 'way_points': [2104, 2524]}, {'distance': 7580.6, 'duration': 389.8, 'type': 12, 'instruction': 'Keep left', 'name': '-', 'way_points': [2524, 2641]}, {'distance': 789.0, 'duration': 63.1, 'type': 13, 'instruction': 'Keep right', 'name': '-', 'way_points': [2641, 2663]}, {'distance': 815.9, 'duration': 65.3, 'type': 12, 'instruction': 'Keep left', 'name': '-', 'way_points': [2663, 2684]}, {'distance': 682.9, 'duration': 54.6, 'type': 0, 'instruction': 'Turn left onto Heinrich-Drimmel-Platz', 'name': 'Heinrich-Drimmel-Platz', 'way_points': [2684, 2711]}, {'distance': 988.1, 'duration': 79.0, 'type': 0, 'instruction': 'Turn left onto Arsenalstraße', 'name': 'Arsenalstraße', 'way_points': [2711, 2723]}, {'distance': 11.7, 'duration': 2.1, 'type': 0, 'instruction': 'Turn left', 'name': '-', 'way_points': [2723, 2725]}, {'distance': 0.0, 'duration': 0.0, 'type': 10, 'instruction': 'Arrive at your destination, on the left', 'name': '-', 'way_points': [2725, 2725]}]
So I get:
|20.6|[0, 5]|
|44344|[5, 17]|
|273.0|[17, 115]|
|2679.3|[115, 675]|
|531.1|[675, 780]|
|64.1|[780, 804]|
|4.0|[804, 807]|
|4915.0|[807, 2104]|
|2784.5|[2104, 2524]|
|389.8|[2524, 2641]|
|63.1|[2641, 2663]|
|65.3|[2663, 2684]|
|54.6|[2684, 2711]|
|79.0|[2711, 2723]|
|44198|[2723, 2725]|
|0.0|[2725, 2725]|
for duration and their according way_points. The waycategory values and their geometry in this case look like that:
[0, 145, 0], [145, 169, 1], [169, 2676, 3], [2676, 2772, 0], [2772, 4566, 3], [4566, 4569, 1], [4569, 5217, 3], [5217, 5237, 1], [5237, 5563, 0], [5563, 5587, 1],…
They do not match with the steps waypoints.
So I can see no way of connecting waycategory’s waypoints + value with steps’ waypoints + durations…
If there is another way, please let me know!