Hi Chris,

I've done something similar in Python. I just run OSRM locally with the data 
built using the bike profile, and then make repeated http requests to 
localhost. Each request takes only about 5 milliseconds, so I haven't needed to 
parellelize yet. I'm running ~150k requests at a time and it takes a few 
minutes.

I believe you can request the output as geoJSON, so it's just a matter of 
parsing the geometry portion of the JSON data returned by OSRM and then 
exporting all that to whatever format you prefer.

You can check out some of my Python code here: 
https://github.com/Nate-Wessel/TO-bike-map/blob/master/between.py
There is a shell script in there as well that shows how I start up OSRM and 
process the OSM data: 
https://github.com/Nate-Wessel/TO-bike-map/blob/master/update-streets.sh

Hope that helps!

Nate Wessel, PhD
Planner, Cartographer, Transport Nerd
NateWessel.com<https://www.natewessel.com>

On 2020-03-02 10:02 a.m., Chris Willer wrote:
Hi all,

I was wondering if anyone knows the best way to approach this project I'm 
working on.  I have a csv file with 20,000 start and stop points for a bike 
share program.  I'm trying to map the fastest bike route for each row.  I 
program using R and am wondering how if anyone knows how to utilize OSM to map 
these routes and then extract them as shapefiles.

Any help would be appreciated.

Best,
Chris





_______________________________________________
OSRM-talk mailing list
OSRM-talk@openstreetmap.org<mailto: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

Reply via email to