Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I set up Open Source Routing Machine (OSRM). The documentation does a pretty good job of laying everything out and I was able to get a server set up and running on my machine. My question is about handling the JSON output from my server. As explained in the documentation the routing information is encoded. My application was built accepting JSON from Mapquest's Open API which is unencoded.

My question is do I need to perform a special function to unencode the data? Or better yet, is their some feature baked into OSRM I am not using properly to get the unencoded results?


Solved: Adding ?compression=false to the request query will output unencoded data.

share|improve this question
since you solved it yourself, feel free to add your solution as an "Answer" below and mark it as "Accepted" to close the question. Thanks. – RyanDalton Jan 3 '13 at 21:45
I think he cannot accept his own answer for his own question.... It will be a little crazy introspective thing to do... ( well, better than downvote his own answer !! ) – Magno C Jan 4 '13 at 14:03
I figured out the solution right after I posted the question. But, because I didn't have enough points, I would have had to wait 8 hours to answer it. – kevinaskevin Jan 4 '13 at 14:44
up vote 7 down vote accepted

Solved by himself :

Adding ?compression=false to the request query will output unencoded data.

A proof that smeagol and gollum can work together. ( what is compression, my precious? )

share|improve this answer

Instead of avoiding compression you can fix the real problem.

If you have lots of points (which is the case for routing) and you send them as normal json numbers you have a big response and a problem. To reduce that size one could embed a binary form of the point list into the json.

OSRM is doing this via googles algorithm, of course there are other options and algorithms.

Now to read that data you can just use the OSRM utility or the google one on the javascript side.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.