<div dir="ltr"><div><div><div><div>Hej!<br><br></div>> My requirement is to, write a piece of 
code that takes start and end locations and return the waypoints that 
the vehicle has to traverse through. <br><br></div>First please make sure you have go as low-level as using libosrm the C++ library instead of using the high-level HTTP interface [0] or the NodeJS bindings[1].<br><br></div>Now for using libosrm in C++ you have to follow the build steps. Assuming you already have all the required dependencies, in the osrm-backend directory do:<br><br></div><div>  mkdir build && cd build<br></div><div>  cmake ..<br></div><div>  make<br></div><div>  sudo make install<br><br></div><div>This will build and install libosrm and the osrm-* binaries. Then, in the example directory:<br><br></div><div>  mkdir build<br></div><div>  cmake ..<br></div><div>  make<br><br></div><div>Builds the example program. The example program takes a *.osrm file and runs routing queries on it.<br><br></div><div>To generate a *.osrm file you have to follow the Running OSRM steps. Assuming you want to a routing network based on the car profile:<br><br></div><div>  osrm-extract -p profiles/car.lua map.osm.pbf<br></div><div>  osrm-contract map.osrm<br><br></div><div>You can get base maps for example from Geofabrik [2].<br></div><div><br></div><div>You will find detailed explanations for response objects in the docs [0].<br></div><div><br></div><div>Cheers,<br></div><div>Daniel J H<br></div><div><br></div><div><br>0  <a href="https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#http-api">https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#http-api</a><br>1  <a href="https://github.com/Project-OSRM/node-osrm">https://github.com/Project-OSRM/node-osrm</a><br>2  <a href="http://www.geofabrik.de/data/download.html">http://www.geofabrik.de/data/download.html</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 30, 2016 at 8:36 PM, Harikrishnan Lakshmanan <span dir="ltr"><<a href="mailto:lharikrishnan1993@gmail.com" target="_blank">lharikrishnan1993@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>Thanks for developing such a software and open sourcing it. </div><div><br></div><div>I am a newbie and find it hard to use the libosrm library. I see that, an example has been provided and I don't understand how I should run it. After doing the cmake, I don't find the compiled binaries in the /use/local/*. </div><div><br></div><div>1. How do I run the 'example.cpp' file found under the examples folder? </div><div>2. On running the program, where do I get the list of waypoints from?</div><div><br></div><div>My requirement is to, write a piece of code that takes start and end locations and return the waypoints that the vehicle has to traverse through. </div><div><br></div><div>3. After writing the code, where should I place it for proper compilation? Under /src ? <br></div><div><br></div><div>Any help is highly appreciated.</div><div><br></div><div>Thank you very much in advance.</div><div>Regards,</div><div><br></div><div>Hari</div><div> </div></div>
<br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>