# What does 'type' stand for in segments output?

**URL:** https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701
**Category:** directions
**Created:** [April 19, 2021, 1:23pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701 "2021-04-19T13:23:37Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 19, 2021, 1:23pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/1 "2021-04-19T13:23:37Z")

</div>

Hi,

I’m wondering what the ‘type’ output can be decoded with. Example here:

‘way\_points’: [780, 804]}, {‘distance’: 49.6, ‘duration’: 4.0, ‘type’: 12

the ‘type’ values in my case range from 0 to 13, I can not find a reference…

thanks for your help!

---

<div class="post-metadata">

### Author: ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)
#### Post date: [April 19, 2021, 1:56pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/2 "2021-04-19T13:56:20Z")

</div>

Hey @onkel_butterbrot ,

this is the **instruction type**. Since this is a rather specialized feature, it is not documented in the API directly, but on github:

> **[GIScience/openrouteservice-docs - Instruction Types](https://github.com/GIScience/openrouteservice-docs#instruction-types)**
>
> :memo: This repository stores the swagger specifications of the openrouteservice API. Browse to swagger for a detailed overview.

Best regards,  
Jakob

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 19, 2021, 3:08pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/3 "2021-04-19T15:08:35Z")

</div>

Thanks for your quick response. As I am looking at the duration on certain waycategories/waytypes this feature is a rather important one to me.

I’ve already had a look at the github documentation - but waytypes there have values ranging from 0 to 10 only. As stated I get values well beyond that - how can those be interpreted?

Also is there a correlation between waytype and waycategory? if say I wanted the duration on highways in the defined way\_points, is there a way to get that?

thanks for your help!

---

<div class="post-metadata">

### Author: ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)
#### Post date: [April 19, 2021, 3:23pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/4 "2021-04-19T15:23:22Z")

</div>

Hey @onkel_butterbrot ,

I’m very sorry - I was mistaken in my answer from earlier.  
This is an excerpt from a list of steps of one segment, right?

If so, the `type` mentioned here is the instructions type. I have corrected my link from earlier.

Waytypes are available via the `extra_info`-parameter and are given in the `extras["waytype"]`-section in the response.

Best regards,  
Jakob

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 19, 2021, 4:37pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/5 "2021-04-19T16:37:59Z")

</div>

Yes, exactly. Good to know - so it does not make sense to extract that information to get the duration on certain waycategories…

Do you by chance know how to get that information?

I think if I do it just for one pair of coordinates it will display duration for waycategories, but if I do it for hundreds of coordinates, the duration will be added together and will not give information about the duration on waycategories for certain parts of the route, right?

e.g. I have coordinates from Hamburg to Vienna - I can see waycategories + duration  
But if I have multiple coordinates from Hamburg to Vienna to Berlin to Köln, I will only get the durations for waycategories all together, but not for the route from Hamburg to Vienna alone - is this right?

thanks for sticking with me - hopefully my issue is understandable 🙂

---

<div class="post-metadata">

### Author: ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)
#### Post date: [April 20, 2021, 8:42am UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/6 "2021-04-20T08:42:20Z")

</div>

Hey,

as stated, waycategor/waytype-information will be available in the `extras`-section if you ask for it using the `extra_info`-parameter.  
This can be a bit tricky to read, have a look at [this response](https://ask.openrouteservice.org/t/waytype-value-types/1431/4) where it gets explained a bit.

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.

Best regards,  
Jakob

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 20, 2021, 10:33am UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/7 "2021-04-20T10:33:42Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)
#### Post date: [April 20, 2021, 3:33pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/8 "2021-04-20T15:33:40Z")

</div>

Hey,

yes, the extra-info summary currently does not contain durations, but only distances - this is an error on my side, sorry for that. Adding a duration to the extra-info summary looks like a non-trivial task to me, but if you want you can still open an issue [in our repo](https://github.com/GIScience/openrouteservice/).

I agree with your assessment that it’s currently not possible to connect the information you want - at least not from a single query.

What might be possible as a workaround is to add all points where the waycategory changes to your query and issue it once more. That way, the segments should “break” at the same points where the waycategories do, and you should be able to calculate durations for waycategories from the durations of the steps.

Out of curiosity:  
Do I read correctly that you are requesting a route of ~80.000 km?  
If so, are you using our API and aggregating queries or are you running your own instance?

If you include another example, could you also share the request you issued? This might make it easier to see what’s going on - e.g. when summing up durations and waypoints, two durations seem to be faulty given the response from above - [5,17] has duration 44344 in your summary and 28.5 in the response, same for 44198.

Best regards,  
Jakob

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 21, 2021, 6:46am UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/9 "2021-04-21T06:46:37Z")

</div>

Hi Jakob,

I am working with my own instance via docker.

I have actually no programming/it background, but am working with ORS for my master thesis - so everything I do is trial and error.

> [@jschnell](#):
>
> If you include another example, could you also share the request you issued? This might make it easier to see what’s going on - e.g. when summing up durations and waypoints, two durations seem to be faulty given the response from above - [5,17] has duration 44344 in your summary and 28.5 in the response, same for 44198.

Thanks for noticing - the code I am running after requesting the data is:

```
for duration in data['features'][0]['properties']['segments'][0]['steps']:
       print(duration['duration'])

    
for wp in data['features'][0]['properties']['segments'][0]['steps']:
    print(wp['way_points'])

```

I reran it and it is fine now - must’ve been an error when copy/pasting…🙂

> [@jschnell](#):
>
> What might be possible as a workaround is to add all points where the waycategory changes to your query and issue it once more. That way, the segments should “break” at the same points where the waycategories do, and you should be able to calculate durations for waycategories from the durations of the steps.

Thanks, will have to look into it - my workaround for now was to use the distance and have it calculate with avg speed into duration. We’ll see how that works out!

> [@jschnell](#):
>
> Adding a duration to the extra-info summary looks like a non-trivial task to me, but if you want you can still open an issue [in our repo](https://github.com/GIScience/openrouteservice/).

If that could be added in time, it would be really nice! Github issues only for issues/bugs - improvements in the forum? 😋

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 23, 2021, 1:27pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/10 "2021-04-23T13:27:22Z")

</div>

Hey again,

I tried rerunning the coordinates of the steps’ waypoints but couldn’t even get that far.

The waypoints value in steps in my case go up to **945649** , whereas the length of “coordinates” in geometry is only **945647**.

Calling geometry[945646] gives me the last coordinate… which also fits the last waypoint of waycategories, which is also **945646**.

What am I missing - where do the remaining three coordinates go missing? 😛

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [April 23, 2021, 1:30pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/11 "2021-04-23T13:30:19Z")

</div>

Could you please share a requests for your example?

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 23, 2021, 1:36pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/12 "2021-04-23T13:36:37Z")

</div>

This is my test-request:

> import openrouteservice  
> import pandas as pd  
> import requests  
> import json
> 
> df = pd.read\_csv(r"C:\file")
> 
> lon = list(df.Longitude)  
> lat = list(df.Latitude)
> 
> Coordinates = list(map(lambda x, y: [x, y], lon, lat))
> 
> from itertools import groupby  
> coords = [x[0] for x in groupby(Coordinates)]
> 
> body = {“coordinates”:coords,“extra\_info”:[“waycategory”]}
> 
> headers = {  
> ‘Accept’: ‘application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8’,  
> ‘Content-Type’: ‘application/geo+json; charset=utf-8’  
> }  
> call = requests.post(‘[http://127.0.0.1:8080/ors/v2/directions/driving-hgv/geojson](http://127.0.0.1:8080/ors/v2/directions/driving-hgv/geojson)’, json=body, headers=headers)
> 
> weiter = call.text
> 
> data = json.loads(weiter)
> 
> geometry = data[‘features’][0][‘geometry’][‘coordinates’]
> 
> print(len(geometry))
> 
> print(geometry[945646])

print(len(geometry) gives:

> 945647

last waypoints for segments:

> way\_points’: [945630, 945641]}, {‘distance’: 325.1, ‘duration’: 78.0, ‘type’: 0, ‘instruction’: ‘Turn left onto Weschelstraße’, ‘name’: ‘Weschelstraße’, ‘way\_points’: [945641, **945649**]}, {‘distance’: 0.0, ‘duration’: 0.0, ‘type’: 10, ‘instruction’: ‘Arrive at Weschelstraße, on the right’, ‘name’: ‘-’, ‘way\_points’: [**945649** , **945649**]}]}], ‘extras’: {‘waycategory’

last waypoints for waycategory:

> , [944914, **945646** , 0]], ‘summary’: [{‘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}]}}

final waypoints:

> 939863, 940338, 940550, 940820, 941319, 941562, 941687, 941866, 942115, 942867, 943467, 943702, 944355, 944961, 945207, 945462, **945646** ], ‘summary’: {‘distance’: 71761096.1,

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [April 23, 2021, 1:41pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/13 "2021-04-23T13:41:16Z")

</div>

Could you print the body, so i can replicate the route please?

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 23, 2021, 1:51pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/14 "2021-04-23T13:51:58Z")

</div>

Thanks for your quick responses!!

Coordinates (if that’s what you mean with body) are here:

edit. no longer needed

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [April 23, 2021, 2:09pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/15 "2021-04-23T14:09:56Z")

</div>

Wow, thats over 1k coordinate pairs… is this really ment to be a single route?  
Our normal API only allows for 50 at maximum.

If you can’t reproduce this problem in a simplistic minimal example request for us to check, theres not much we can do to help here.

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 23, 2021, 2:21pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/16 "2021-04-23T14:21:52Z")

</div>

Well, it is not a single route per se - these are lots of routes which are done one after another and need to be analysed. I’m running it through my own instance.

Maybe I can try to loop the request for one pair of coordinates only and see if the problem keeps on occuring.

But can you confirm, geometrie’s coordinates should be as long as the segements’ steps’ waypoints?

Edit.: I tried running coordinates[0:50] and coordinates[0:500] - at 500 it’s already missing a coordinate. Probably need to run it for less coordinates 🙂

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 26, 2021, 7:20am UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/17 "2021-04-26T07:20:09Z")

</div>

I actually tried running it again for less coordinates at a time, but the problem persists - so I tried narrowing down for the coordinates where we are “losing” geometry coordinates.

It happens e.g. when rquesting a route for this coordinate pair:

> [[16.399336444444444, 48.140432], [16.398647148148147, 48.140541185185185]]

which results in:

> {‘type’: ‘FeatureCollection’, ‘metadata’: {‘attribution’: ‘[openrouteservice.org](http://openrouteservice.org), OpenStreetMap contributors’, ‘service’: ‘routing’, ‘timestamp’: 1619421406076, ‘query’: {‘coordinates’: [[16.399336444444444, 48.140432], [16.398647148148147, 48.140541185185185]], ‘profile’: ‘driving-hgv’, ‘format’: ‘geojson’, ‘extra\_info’: [‘waycategory’]}, ‘engine’: {‘version’: ‘6.3.6’, ‘build\_date’: ‘2021-02-20T08:07:49Z’, ‘graph\_date’: ‘2021-02-07T21:42:03Z’}}, ‘features’: [{‘bbox’: [16.399427, 48.140437, 16.399427, 48.140437], ‘type’: ‘Feature’, ‘properties’: {‘segments’: [{‘steps’: [{‘distance’: 0.0, ‘duration’: 0.0, ‘type’: 11, ‘instruction’: ‘Head east’, ‘name’: ‘-’, ‘way\_points’: [0, 1]}]}], ‘extras’: {‘waycategory’: {‘values’: , ‘summary’: }}, ‘way\_points’: [0, 0], ‘summary’: {}}, ‘geometry’: {‘coordinates’: [[16.399427, 48.140437]], ‘type’: ‘LineString’}}], ‘bbox’: [16.399427, 48.140437, 16.399427, 48.140437]}

We have 2 waypoints for segments’ steps, but only 1 in geometry and waycategory’s waypoints.

Edit: It appears to be happening for coordinate pairs, which are very close together. I will try finding the other coordinates where the geometry loss happens.

Edit2: Found the next pair of coordinates where it happens:

> [[16.31205681818182, 48.20351900000001], [16.31216957142857, 48.20357839285714]]

Any idea on how to deal with this?

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [April 26, 2021, 1:43pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/18 "2021-04-26T13:43:31Z")

</div>

Hmm that’s really strange behaviour.  
It seems to be happening only for the hgv profile.

i’ve created an issue in our backend repo:

> <https://github.com/GIScience/openrouteservice/issues/914>
>
> \#### Here's what I did
> 
> See https://ask.openrouteservice.org/t/what-does-type-…stand-for-in-segments-output/2701/17
> 
> 
> \`https://api.openrouteservice.org/v2/directions/driving-car/geojson\`
> \`\`\`
> {"coordinates":\[\[16.39933644,48.140432\],\[16.3986471,48.1405411\]\],"extra\_info":\["waytype"\]}
> \`\`\`
> \---
> \#### Here's what I got
> 
> \`\`\`
> {"type":"FeatureCollection","features":\[{"bbox":\[16.399427,48.140437,16.399427,48.140437\],"type":"Feature","properties":{"segments":\[{"distance":0.0,"duration":0.0,"steps":\[{"distance":0.0,"duration":0.0,"type":11,"instruction":"Head east","name":"-","way\_points":\[0,0\]}\]}\],"extras":{"waycategory":{"values":\[\],"summary":\[\]}},"summary":{},"way\_points":\[0,0\]},"geometry":{"coordinates":\[\[16.399427,48.140437\]\],"type":"LineString"}}\],"bbox":\[16.399427,48.140437,16.399427,48.140437\],"metadata":{"attribution":"openrouteservice.org | OpenStreetMap contributors","service":"routing","timestamp":1619444352645,"query":{"coordinates":\[\[16.39933644,48.140432\],\[16.3986471,48.1405411\]\],"profile":"driving-car","format":"geojson","extra\_info":\["waycategory"\]},"engine":{"version":"6.4.1","build\_date":"2021-04-12T11:21:00Z","graph\_date":"1970-01-01T00:00:00Z"}}}
> \`\`\`
> The geometry only contains one single point and values for extra information are empty (which should be filled with an no extra info entry similar to https://github.com/GIScience/openrouteservice/issues/636)
> 
> But here the segments steps contain \`"way\_points":\[0,0\]\`
> 
> If you switch to 
> \`https://api.openrouteservice.org/v2/directions/driving-hgv/geojson\`
> 
> for the same body:
> 
> \`\`\`
> {"type":"FeatureCollection","features":\[{"bbox":\[16.399427,48.140437,16.399427,48.140437\],"type":"Feature","properties":{"segments":\[{"steps":\[{"distance":0.0,"duration":0.0,"type":11,"instruction":"Head east","name":"-","way\_points":\[0,1\]}\]}\],"extras":{"waycategory":{"values":\[\],"summary":\[\]}},"summary":{},"way\_points":\[0,0\]},"geometry":{"coordinates":\[\[16.399427,48.140437\]\],"type":"LineString"}}\],"bbox":\[16.399427,48.140437,16.399427,48.140437\],"metadata":{"attribution":"openrouteservice.org | OpenStreetMap contributors","service":"routing","timestamp":1619444282167,"query":{"coordinates":\[\[16.39933644,48.140432\],\[16.3986471,48.1405411\]\],"profile":"driving-hgv","format":"geojson","extra\_info":\["waycategory"\]},"engine":{"version":"6.3.6","build\_date":"2021-03-26T08:06:42Z","graph\_date":"1970-01-01T00:00:00Z"}}}
> \`\`\`
> 
> you get the same geometry, but a \`"way\_points":\[0,1\]\` in segments, even though there is no waypoint 1.
> 
> \---
> \#### Here's what I was expecting
> 
> 
> The waypoint number in the instructions being in line with the geometry.
> 
> (no extra information stub for the segment instead of empty array see https://github.com/GIScience/openrouteservice/issues/636)
> 
> \---
> \#### Here's what I think could be improved

feel free to add details

---

<div class="post-metadata">

### Author: ![onkel\_butterbrot](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/onkel_butterbrot/32/837_2.png) [@onkel\_butterbrot](https://ask.openrouteservice.org/u/onkel_butterbrot)
#### Post date: [April 26, 2021, 2:42pm UTC](https://ask.openrouteservice.org/t/what-does-type-stand-for-in-segments-output/2701/19 "2021-04-26T14:42:40Z")

</div>

> [@jschnell](#):
>
> What might be possible as a workaround is to add all points where the waycategory changes to your query and issue it once more. That way, the segments should “break” at the same points where the waycategories do, and you should be able to calculate durations for waycategories from the durations of the steps.

Actually tried this - unfortunately it does not line up perfectly…

> [@amandus](#):
>
> feel free to add details

will have a look - thanks!
