Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a PostGIS DB using osm2po and I am using pgrouting to calculate the routes.

The application I am creating should find routes for cyclists so I want the route finder to prefer roads with cycle lanes present and to never plot a route containing motorways.

Looking through the config files I see: wrt.finalMask = car along with other tags such wtr.tag.highway.motorway = 1, 11, 120, car

I was wondering are these the parameters that I should tweak to accomplish this?

Would I just remove tags such as motorway etc.?


share|improve this question
Answer is here:… – Mapperz Jan 28 '13 at 21:23
and here… User Carsten is the knowledge based on this. – Mapperz Jan 28 '13 at 21:25
up vote 2 down vote accepted

It's easy. Let's regard these lines:

wtr.tag.highway.secondary_link = 1, 22, 30,  car
wtr.tag.highway.tertiary = 1, 31, 40,  car|bike


wtr.finalMask = car

imports both road types,


wtr.finalMask = bike

imports the tertiary road only.

Actually car|bike are values (1+2=3) in the flags-column. It's derived from the wtr.flagList = car, bike, foot ... where car=1, bike=2, foot=4 and so on.

share|improve this answer
Hi, Thanks a lot that works well. Just one question. Would it be possible for me to add a custom tag such as 'difficulty' to the OSM data in my database and then have osm2po calculate the costs based on the difficulty of a way from 0 to 10. This is so the route-finder would prefer easier roads than difficult roads? – sam Feb 1 '13 at 11:51
Hi Sam, please move your question to another (new) thread. But in short: yes, it's possible. – Carsten Feb 1 '13 at 18:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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