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

Is it possible to prevent road segments being used when these are blocked by bollards, concrete blocks or the like?

I have one example where there the road Solhøjvej is blocked with a so called concrete block as you can see here

Here is a photo of the "block":,9.934331&spn=0.000929,0.00284&t=m&layer=c&cbll=57.010252,9.934346&panoid=SrWxGTFwoDbDZeDgXHl8vg&cbp=12,10.73,,0,10.62&z=19

I’m exporting the Openstreetmap to PostgreSQL using osm2po and performs routing, but this does not know of these concrete blocks or bollards or stuff blocking the road.

I’m aware that this is perhaps not a simple task, to detect and split road segments when such obstacles occur, but that would be very useful. Am I just missing an option?

share|improve this question
up vote 6 down vote accepted

Yes, it's possible. But osm2po only takes barrier=bollard into account by default. If you need other types of barriers you'll have to use Java in order to override DefaultNodeTagResolver.isBarrier(). For pgRouting this information can be retrieved from the Vertex-Table which is not written by default, but can be activated by setting in the config. Once created look for clazz < 0 in the table. Additionally setting sth. like in the config or on the commandline visualizes them in the WebTestUI (see below)

In osm2po barriers are handled like turn restrictions and must be explicitly activated by setting

bollard-barries in Hamburg

share|improve this answer
Very exciting, I'm having a look at it now :) I'll get back. – xcalibur666 Apr 5 '13 at 9:56
Fantastic, I got it working. Now I both load bollards and concrete blocks. I did as you said and implemented my own nodetagresolver and it is working like a charm. Thank you for your help, this is VERY usefull! – xcalibur666 Apr 5 '13 at 11:20

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.