# Waypoints coordinates

**URL:** <https://ask.openrouteservice.org/t/waypoints-coordinates/3148>\
**Category:** directions\
**Created:** [September 16, 2021, 4:21pm UTC](https://ask.openrouteservice.org/t/waypoints-coordinates/3148 "2021-09-16T16:21:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marta\_Arenas](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/marta_arenas/32/1197_2.png) [@Marta\_Arenas](https://ask.openrouteservice.org/u/Marta_Arenas)\
**Post date:** [September 16, 2021, 4:21pm UTC](https://ask.openrouteservice.org/t/waypoints-coordinates/3148/1 "2021-09-16T16:21:15Z")

</div>

Hello, i’m making an map app and I want to show de instructions in every step (for example, it has to tell me “turn to left on street …” when i arrive there) but i don’t know how to get the coordinates of every waypoint/step. Is there any way I can get them? Thank you.

---

<div class="post-metadata">

**Author:** ![Yinon\_Oshrat](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/yinon_oshrat/32/1120_2.png) [@Yinon\_Oshrat](https://ask.openrouteservice.org/u/Yinon_Oshrat)\
**Post date:** [September 16, 2021, 8:20pm UTC](https://ask.openrouteservice.org/t/waypoints-coordinates/3148/2 "2021-09-16T20:20:01Z")

</div>

each step contains start and end indices to the route geometry path.  
so just check the coordinate of those indices.

---

<div class="post-metadata">

**Author:** ![Raspinaute](https://ask.openrouteservice.org/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@Raspinaute](https://ask.openrouteservice.org/u/Raspinaute)\
**Post date:** [November 7, 2021, 9:51pm UTC](https://ask.openrouteservice.org/t/waypoints-coordinates/3148/3 "2021-11-07T21:51:58Z")

</div>

Hello,

thanks for this information.  
I have another question about that.  
How can we get coordinates with those indices.  
Which is the relation between indices and coordinates ?

thanks in advance for your answer.

---

<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:** [November 8, 2021, 9:27am UTC](https://ask.openrouteservice.org/t/waypoints-coordinates/3148/4 "2021-11-08T09:27:11Z")

</div>

Hi @Raspinaute,

indices as in index of geometry array `[Pos1, Pos2, Pos3,...]`  
where Pos1 would have Index `0`.  
to get the coordinates of indice you use basic array accessing.

e.g. for the `/v2/directions/{profile}/geojson` response:  
the geometry array is in `features.geometry`  
to get position `x` you access `features.geometry[x]` which is itself an array of `[lon,lat]`

depending on the programming language you are using the access might be a bit different.

Edit:  
for the default endpoint `/v2/directions/{profile}` as well as for `/v2/directions/{profile}/json` the geometry is an encoded polyline and needs to be [decoded](https://giscience.github.io/openrouteservice/documentation/Geometry-Decoding.html) before usage.

Best regards

---

<div class="post-metadata">

**Author:** ![Raspinaute](https://ask.openrouteservice.org/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@Raspinaute](https://ask.openrouteservice.org/u/Raspinaute)\
**Post date:** [November 8, 2021, 10:49pm UTC](https://ask.openrouteservice.org/t/waypoints-coordinates/3148/5 "2021-11-08T22:49:26Z")

</div>

Thanks of lot for all your informations.  
I was able to get coordinates of specifc waypoint in the route, in python.

Best regards
