Re: [OSRM-talk] Using OSRM linked into other code?

2014-11-07 Thread John Firebaugh
Hi Steve,

Recent versions of osrm-backend build a library which you can link against.
See https://github.com/Project-OSRM/node-osrm/ for an example.

cheers,
John

On Fri, Nov 7, 2014 at 7:13 AM, Stephen Woodbridge wood...@swoodbridge.com
wrote:

 Hi,

 I seem to remember a while back that there was a discussion about the
 possibility to embed the OSRM routing engine at the code level rather than
 doing HTTP requests to a server.

 I now find myself in a position that this would be desirable to do. I have
 a small coverage area like a city, but I'm getting killed by the overhead
 of formatting requests as strings, making a socket connection to
 osrm-routed, parsing the responses, etc. Making local requests my server
 this is taking 4-500 ms per request.

 Basically, I'm doing viaroute requests with 2-100 via points. 99% of the
 time all I need to know is the travel time.

 Since I'm developing in C++, I thought it might be easy and much faster to
 instantiate the routing engine and then have a simple interface where I can
 pass a container of points and get back the travel time for that route
 and/or the path coordinates. But I could live without the coordinates if I
 had to.

 Has anyone done this already? Can you share?

 I have started digging through the source to see if I can do this, but
 working my way in from osrm-routed or Tools/simpleclient.cpp the code is
 very entangled with all the http request/response stuff that I would
 ideally like to avoid. So far the most promising path looks like using some
 variant of the simpleclient, but its not obvious if or how to untangle all
 the json stuff and simply return a struct or class to the caller without
 that. I spent most of yesterday, digging through this and made a lot of
 progress just understanding simpleclient and getting ti to compile and work
 and get it to actual return results using a shared memory connection.

 A little help in this direction would be appreciated.

 Thanks,
   -Steve

 ___
 OSRM-talk mailing list
 OSRM-talk@openstreetmap.org
 https://lists.openstreetmap.org/listinfo/osrm-talk

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] vector::_M_range_check error

2014-06-19 Thread John Firebaugh
Hi Matthias,

One thing to check is that the data files being used were generated with
the same version of OSRM. I have seen this error when a 0.4.1 server used
data files generated with 0.3.9.

John


On Thu, Jun 19, 2014 at 5:33 AM, Matthias Schwamborn 
schwamb...@informatik.uos.de wrote:

 Hi all,

 I've set up my own OSRM server (v0.4.1) and encountered the following
 error several times so far (for different (src,dst) pairs):

 [warn] [server error] code: vector::_M_range_check, uri:

 /viaroute?loc=55.76191121265607,37.599698264694666loc=55.76045290194501,37.59812508836046z=14

 I also tried getting more information by compiling osrm-routed in debug
 mode, but to no avail. Any pointers to what this error means and how I
 can avoid it? Thanks.


 Best,
 Matthias

 --
 Matthias Schwamborn

 University of Osnabrück Tel.:   +49-541-969-7167
 Institute of Computer Science   Fax:+49-541-969-2799
 Albrechtstr. 28 E-mail: schwamb...@informatik.uos.de
 D-49076 Osnabrück, Germany  http://cs.uos.de/schwamborn/


 ___
 OSRM-talk mailing list
 OSRM-talk@openstreetmap.org
 https://lists.openstreetmap.org/listinfo/osrm-talk


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk