0

I download a cartography bike from the open data data link to Postgres then I convert it to osm using:

 python ogr2osm.py "PG:dbname=x user=x host=localhost" --sql="SELECT * FROM bike_network" --output=/home/vdm/bike_network.osm

But when I tried to extract the osm file using osrm-extract I had an error:

enter image description here

My question is it's possible to use osrm with other maps or it just works with openStreetMap maps?

3

You have to change the used speed profile (defined in a .lua file) depending on the specific attributes of your edges/ways.

By default, car.lua considers edges with common OSM attributes like highway=secondary which are suitable for cars.

  • If I understand your answer correctly, I have to create a bike profile (bicycle.lua)? but the problem I can not find this file (I'm using OSRM Docker). It will be appreciated if you give me more hint or an example. Thank you for your reply. (I am new user in OSRM) – Adil Blanco Apr 11 '18 at 13:58
  • Sounds like your current profile (car.lua) can't find any routable ways (edges) in your input file (bike_network.osm). So take a look at both do determine which input car.lua expects and which input you are actually providing. – scai Apr 11 '18 at 14:04
  • Yep, you have to create a "bike profile" (but the file name does not have to be bicycle.lua). In this profile you define which ways are suitable for bicycle routing and which speed is assumed for different road categories. For a introduction to OSRM profiles, see this page. When executing osrm-extract, you specify your individual bike profile instead of the default car profile (which is in car.lua). – Mesa Apr 11 '18 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.