[OSRM-talk] Experimental C and Python Bindings for OSRM v5

Daniel Hofmann hofmann at mapbox.com
Sat Apr 2 12:49:46 UTC 2016


Yesterday I started some experimental C bindings for the upcoming OSRM v5
release:

https://github.com/daniel-j-h/libosrmc

Here is the C example:

https://github.com/daniel-j-h/libosrmc/blob/b5e437e9fbd3a96ca17d91ac09a1ce5ecf0df6b6/example.c#L6-L62

Today I had a look at how hard it would be to interface with the C bindings
through Python's FFI. Turns out not that hard. Here's the same example in
Python:

https://github.com/daniel-j-h/libosrmc/blob/master/osrmcpy.py#L115-L135

This is still in its early stage, but you can already get distances and
durations out of it.

I would love to hear from you if this is something you're interested in
(and specific use-cases in particular) or if the C++ libosrm library is
good enough for all of your use-cases.

Cheers,
Daniel J H
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20160402/15e78323/attachment.html>


More information about the OSRM-talk mailing list