2

I am writing a code that performs a custom routing on the sql relation generated by osm2po. Amongst several other things, I need to detect if the selected route (list of ids) passes through one or more toll booths, and then display them on the map.

I have a table that contains the list of nodes that are toll booths with their corresponding osm id, and I would like to go through the list of ways in the generated route while matching the start and end nodes.

Unfortunately, this doesn't work in all cases since some toll nodes are removed (joined) by osm2po. Therefore, is there a way to prevent osm2po from joining ways, at least in the case of toll nodes?

2 Answers 2

1

Yes, it is possible and the template you need can be found inside the plugins directory (Source-Jar). Look for de.cm.osm2po.samples.TrafficSignalsNodeTagResolver

1
  • Thanks! I used TrafficSignalsNodeTagResolver as you suggested with "barrier"/"toll_booth" as the key/value pair. It did the job nicely. PS. I would vote for your answer and say it's the right one but I have no reputation and it doesn't let me.
    – Joan
    Commented Jun 14, 2013 at 19:06
0

i think you could define a special link class in osm2po.config to achieve that.

Look for something like: wtr.tag.highway.tertiary = 1, 31, 40, car|bike

I think you could define smthg like wtr.tag.highway.toll_roads = 1, 131, 80, car

for instance, but it means the toll_roads attribute must be already in OSM: that I have no clue

3
  • Thanks for your prompt reply Fabrice. Any hint on how to do that? Can't find how to do it in the "documentation".
    – Joan
    Commented Jun 11, 2013 at 22:17
  • The question refers to nodes, not to ways. Nevertheless here is another thread on this topic: gis.stackexchange.com/questions/49200/…
    – Carsten
    Commented Jun 13, 2013 at 19:08
  • Thanks guys. Carsten is right, I wanted to detect the toll nodes. Ways can be tagged with tolls but that doesn't necessarily mean a toll booth is located anywhere in that way and that is because the tag refers to the route and not a specific way (at least in the examples I could find).
    – Joan
    Commented Jun 14, 2013 at 19:10

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.