osm2pgrouting (#24) - cycle routing (#391) - Message List

cycle routing


As I see osm2pgrouting don't support cycle routing, is it true? It is possible to contribute to add this support ? How ?

CU Stéphane

  • Message #1701

    You mean it doesn't support import of cycling roads?
    It actually imports the tags that you define in the configuration XML file. So all you need to do is to make sure that you find all tags that cyclists can use. If you import too many roads, you can then later also exclude them with your pgRouting query).

    • Message #1706

      Than how to deal with tags mix like oneway=yes and cycleway=opposite ?

      CU Stéphane

      • Message #1707

        Sorry, I'm not very familiar with the cycling tags in OSM. If it doesn't make sense, it's a data issue IMO. If you have a good proposal for some cycling configuration XML, you're welcome to share and discuss (I think the mailing list is the better way if you want to talk to more users).

        • Message #1725


          osm2pgrouting does support bicycle routing. You just have to: 1) Set up your XML configuration file appropriately (the default is missing a number of tags, as you mention); 2) Do a little post-processing in postgresql to update costs and reverse_costs accordingly.

          For example, our website  http://www.ridethecity.com/brisbane is 100% OSM data and was populated 100% from osm2pgrouting (with some post-processing update queries to adjust costs from the tags' classes associated with the ways).

          By the way, I uploaded a patch that makes osm2pgrouting work better for cycling by importing ALL the tags associated with each way (instead of just one). See ticket #214.

          I've made another update to osm2pgrouting that I'm testing now that will be useful to everyone. The existing version of osm2pgrouting doesn't deal with OSM relations so I've created a version that imports a relations table and a table that links them to ways. I use this now for bicycle routes that are maintained as relations, but it would also be useful to be able to import turn restrictions from OSM for use with the pgRouting shooting star heuristic. The post-processing on that would be a little complicated, but should be possible.

          Thanks, Jordan