NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,

I try out how to work with osrm.

Lets say I do have two different points (one in Aachen and one in Brussel).

I can ask for the map with: http://map.project-osrm.org/?hl=de&loc=50.776279,6.084859&loc=50.841579,4.366734&z=10&center=50.894572,4.945387&alt=0&df=0&re=0&ly=763558683

Now I want to trace that route and count the distance. http://router.project-osrm.org/viaroute?loc=50.776279,6.084859&loc=50.841579,4.366734

I receive this one:

{"hint_data":{"locations":["9HUWANgJugEdgiQAAAAAABoAAAAAAAAAAAAAAP____8AAAAA18gGA_vYXAAAABEA","t8gWBP_____HvRQANwAAAEgAAAAiAAAACAAAAHCp3AMAAAAA68cHA46hQgACABEA"],"checksum":1423277062},"route_name":["",""],"via_indices":[0,1055],"via_points":[[50.776279,6.084859],[50.841579,4.366734]],"found_alternative":false,"route_summary":{"end_point":"Avenue des Arts - Kunstlaan","start_point":"Büchel","total_time":5160,"total_distance":142783},"route_geometry":"klcz_BunkrJeAwJmLiN_FaOwNuU_FaIwHaLmDuFeJ}N{PpHuDdBmOgAuCUcLOaEzl@c@jGeDnl@iAxL_@`E[hDcArK}@tGa@fCcEjWoErT_AvEwA~GsIlb@aDhNeBfIuAlIgApG_AjDyBrDiGbH_F`G{KdNyKzNyFpU{@nDyBpHwP`h@wFxMwOxZeMjPwBxC_A~QcB~D_F~F_FrDeEnCsCtBqBtBg^~[qYhf@gAhBeF~I}JvQ{f@v|@{Wpe@cCjEuBtDgDfGkAvBqCzE_p@jjAgD`GiSd^{FfK_DvFcAhBaBrCgItNmDfGwDzGiAnByAfCaMtTmKdR_DtFuA~BsBzDyJrQmChEsCvEsJpO_NlRqMhOyRlOuU`MsOvEmOnBcHr@qWqAiOuA{MaC_Z}IeW{OcRmOsWeXqM}O}T{`@ko@c}A}Og\\oWic@uOmSaV{V}VoQwZePg[{Ju_@cIic@_EmdA_@wqAeAel@gAwu@oDaf@gEop@wKaOaDeRyEqDw@yz@_TeZkG{b@wGg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AtNlxBdDdc@|Rv_C|e@ftElk@~lE|D`Wv]xaCnDpVht@daFfQjhAjDpVb[psBpf@zcDdk@rcD~AzHrX~tAxhC~pLz]fcBrU`rAxzAtfH`_@r`BdRdu@x^fpAlc@~{Afu@`aCff@pbBrJb[xGlT`a@~kA`k@rgBl]|_Aj`@ppA|Ohn@fKn[dGfVdH~ZvWziAfPzt@vBhJbDlMpPjl@d_@njBxJ`]nOzYtUneAnpAdpJ|Glj@nIp]v_@tpAdZn{@hKpTbFbJlJtZpElNnFvOpUhq@p[f~@|Vpv@xLf[~Rjl@nIpWbBlExClI~t@zsBfC`HkB`CyA`DcAxDk@jEQfH`@dHrAhG|BzEcAbIaFrf@}@tIoUzlBg@pQcA`IiKxx@t@~HgEr[qBhOiGrf@uYj_C}AbMsGph@i@`EiLh_AaA|HcMvbAqGdh@{Fbe@sGxh@mBpOwA~Ke@|DgDnXeF~a@eAdIeAxImBrOgAnIjEtC`Cx@tn@`SrD`Bxc@vRx[|N|FrFxYfMrGlDxDxBfIiAhc@jPnCbApDvAln@jYbH|IrQ~TrCkUmDkGkNmSeh@uW","status_message":"Found route between points","status":0}

I thought that I could forward this information to http://nominatim.openstreetmap.org/search/format=json and then the above mentioned file. It just does not work. Any idea how I could do it right?

Thanks for your advice

asked 27 Feb '15, 10:48

Karten-Newbie's gravatar image

Karten-Newbie
41225
accept rate: 0%

edited 27 Feb '15, 12:20

1

Why do you want to pass the OSRM output to Nominatim? What result are you expecting? Nominatim is a geocoder, it is just able to convert single addresses to geographic locations and vice-versa. It won't understand route instructions.

Regarding your other questions: 5160 does indeed correspond to the required time in seconds and 142783 corresponds to the distance in meters.

(27 Feb '15, 11:55) scai ♦

Thanks for your advice ...

I've deleted the two questions because I realized how dumb they are :-(

What I'm looking for is a tool which receives the route from osrm-website and "answers" with a file in a format which I could analyze in a a way like.

  • 100m, xx sec, Street, Germany
  • 34567m, xy sec, Highway, Germany
  • 23235m, zz sec, Highway, Belgium

I thought that nominatim could provide that answer, when I "give" that file to it.

I guess it is a dumb idea. It would be really kind if you give me a hint which tool or way might be the right one. I promise I will try to read and understand the manual of that tool, before I ask again. ;-)

(27 Feb '15, 12:27) Karten-Newbie

Don't worry, we all learn something new every day :) But unfortunately I'm not aware of such a tool.

(27 Feb '15, 12:33) scai ♦

Thanks to google I found the explanation why I could not read the json-file.

http://router.project-osrm.org/viaroute?compression=false?loc=50.776279,6.084859&loc=50.841579,4.366734

The ?compression=false makes the difference!

Now I could use the points and get with nomination the answer in which country the point is. But there is another problem for me:

I do not know which distance I have! How could I get the distance for these waypoints?

permanent link

answered 02 Mar '15, 09:46

Karten-Newbie's gravatar image

Karten-Newbie
41225
accept rate: 0%

1

Note that without ?compression=false, the polyline is in Google polyline format. You can decode this into lat/lon pairs with a Google polyline decoding library - one exists in most popular languages.

(02 Mar '15, 10:46) Richard ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×85
×63
×28
×1

question asked: 27 Feb '15, 10:48

question was seen: 6,866 times

last updated: 02 Mar '15, 10:46

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum