Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.?

Thanks

share|improve this question
    
Answer is here: gis.stackexchange.com/questions/41286/… –  Mapperz Jan 28 '13 at 21:23
    
and here gis.stackexchange.com/questions/29342/… User Carsten is the knowledge based on this. –  Mapperz Jan 28 '13 at 21:25
add comment

1 Answer 1

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

Setting

wtr.finalMask = car

imports both road types,

setting

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
add comment

Your Answer

 
discard

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.