<div dir="ltr"><div>Here's the v5 equivalent, reporting distance and duration, so it should be exactly what you need:<br><br><a href="https://github.com/Project-OSRM/osrm-backend/blob/master/example/example.cpp">https://github.com/Project-OSRM/osrm-backend/blob/master/example/example.cpp</a><br><br></div>See the v5 Spec and the libosrm C++ API (especially this one has some nice docs! :P):<br><div><br><a href="https://github.com/Project-OSRM/osrm-backend/wiki/Server-API-v5,-current">https://github.com/Project-OSRM/osrm-backend/wiki/Server-API-v5,-current</a><br><a href="https://github.com/Project-OSRM/osrm-backend/wiki/Library-api">https://github.com/Project-OSRM/osrm-backend/wiki/Library-api</a><br><br></div><div>For v5 clone from master, grab the v5 release from Github or use this master branch zip:<br><br><a href="https://github.com/Project-OSRM/osrm-backend/archive/master.zip">https://github.com/Project-OSRM/osrm-backend/archive/master.zip</a><br></div><div><br></div><div>Cheers,<br></div><div>Daniel J H<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 27, 2016 at 9:59 PM, James Grant <span dir="ltr"><<a href="mailto:james@grantzone.net" target="_blank">james@grantzone.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi Daniel<br>
      <br>
      I'm running a release version of OSRM which I downloaded and
      compiled from the instructions given.<br>
      <br>
      The main thing I am after is the driving time and distance
      initially, not interested in alternate route or anything else. In
      OSRM v4 using the simpleclient.cpp as a base for my code, I used
      the following parameters:<br>
      <br>
                      // Set up the parameters required.<br>
                      RouteParameters route_parameters;<br>
                      route_parameters.zoom_level = 18;           // no
      generalization<br>
                      route_parameters.print_instructions = false; //
      turn by turn instructions<br>
                      route_parameters.alternate_route = false;    //
      get an alternate route, too<br>
                      route_parameters.geometry = false;           //
      retrieve geometry of route<br>
                      route_parameters.compression = false;        //
      polyline encoding<br>
                      route_parameters.check_sum = -1;            // see
      wiki<br>
                      route_parameters.service = "viaroute";      //
      that's routing<br>
                      route_parameters.output_format = "json";<br>
                      route_parameters.jsonp_parameter = ""; // set for
      jsonp wrapping<br>
      <br>
      I did try and search in the source code for the equivalent, but
      couldn't find the right source file. Found plenty of references to
      parseParameters etc but nothing that I could say for definite were
      the actual parameters.<br>
      <br>
      Regards<div><div class="h5"><br>
      <br>
      <br>
      On 26-Apr-16 11:24 AM, Daniel Hofmann wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Yes we benchmarked v5 and v4 in<br>
              <br>
              <a href="https://github.com/Project-OSRM/osrm-backend/issues/2211" target="_blank">https://github.com/Project-OSRM/osrm-backend/issues/2211</a><br>
              <br>
              found some regressions and considerably improved v5 in<br>
              <br>
              <a href="https://github.com/Project-OSRM/osrm-backend/pull/2241" target="_blank">https://github.com/Project-OSRM/osrm-backend/pull/2241</a><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            Are you running the v5 release (and not a RC)?<br>
          </div>
          What's your specific use-case?<br>
          If you enable steps and alternatives the response is larger
          than in v4 and especially assembling all the GeoJSON objects /
          variants has some allocation issues. If that's the case, try
          the Polyline format.<br>
          <br>
        </div>
        Daniel J H<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Apr 26, 2016 at 12:43 AM, James
          Grant <span dir="ltr"><<a href="mailto:james@grantzone.net" target="_blank">james@grantzone.net</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <font face="Helvetica, Arial, sans-serif">Hi there.<br>
                <br>
                Has anyone done any comparisons between version 4 and 5
                of OSRM speed wise when looking at the C++ examples (the
                simpleclient.cpp and example.cpp)?<br>
                <br>
                I've now built version 5 and the example.cpp but on
                first appearances, it is slower than version 4. I will
                have to recompile the simpleclient.cpp with the same
                parameters as I've currently got to directly compare
                speed. <br>
                <br>
                Regards<br>
              </font> </div>
            <br>
            _______________________________________________<br>
            OSRM-talk mailing list<br>
            <a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
            <a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/osrm-talk</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
OSRM-talk mailing list
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" target="_blank">https://lists.openstreetmap.org/listinfo/osrm-talk</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<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.org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>