I'd like to use osm2po for a little bike routing planner. Is there a way I can mark those edges that are part of some national, regional or local bike network? It would be nice to give them a higher priority in the routing process as there are usually better for cycling than other roads..

As far as I can see, those bike networks are defined by tags and/or relations : http://wiki.openstreetmap.org/wiki/Cycle_routes

1 Answer 1


Depending on your configuration, setting


filters all cycleways and adds ways referenced by Bicycle-Relations.
You'll find the extra info in the meta-column of the *_4pgr-PostGIS-Table.

In order to modify costs, you'll have to overwrite the DefaultJoinFilter.validate(Way way) -method.

  • Thanks. I tried the folowing: wtr.finalMask = car|bike|foot|ferry rtr.supportedRouteClazzes=bicycle There is an meta-osm column in the *4pgr-table. Unfortunately it remains completely empty. I was using Berlin so there should be a few cycle routes...
    – Yojimbo
    Commented Mar 3, 2015 at 8:48
  • Which version do you use? Try 5.0.0. Did you pass the params on the commandline? If so, remove blanks.
    – Carsten
    Commented Mar 3, 2015 at 11:53
  • Nice! Used verion 5.0.0 now it works.. Great! One more question: Can this information be integrated in the clazz structure easily? Like a special clazz for national bike routes?
    – Yojimbo
    Commented Mar 3, 2015 at 13:39
  • Relations cannot be handled as easy as ways. They totally differ in how to interpret them. Think of restrictions, routes or even boundaries. The only thing you can do is to overwrite some standard behavior in the osm2po-API to transport your special interpretation into the routing. The validate()-Method is the meeting point where all the things get to together. Here you can influence osm2po's default behavior.
    – Carsten
    Commented Mar 3, 2015 at 18:02
  • Hm okay. As we are using our own routing tool it's probably going to be be less trouble to do that later on by ourselves. But thanks for your support and the great osm2po tool in general!
    – Yojimbo
    Commented Mar 3, 2015 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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