[OSRM-talk] osrm route directly from command line not via http possible? (Michael Leonard)

Leonardo Yvens leoyvens at gmail.com
Thu Mar 12 13:12:17 UTC 2015

Hello Michael,

I recently came across a similar issue, I wanted to make OSRM requests
skipping as much overhead as possible. I was making as many requests as I
could on multiple threads, and eventually the local OSRM server would just
hang. By integrating OSRM as a library, the performance at least doubled.

 When you build OSRM, it generates libOSRM.a, which is a static library
with all the OSRM code. Since my project was in C++, I could call it
directly. There must be some way you can call it from R.


This is some C++ code that calls the OSRM functions. You could make a small
command line application that takes the coordinates as parameters and pass
it to that. Don't worry about the http:Reply thing, there is no networking
or I/O overhead involved, it will just render the json to the
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20150312/7f37d28a/attachment.html>

More information about the OSRM-talk mailing list