1

Is it possible in osm2po to additionally consider surfaces as edge weights along with the highways?

I've tried the following:

wtr.tag.highway.pedestrian = 1,1,5, foot

wtr.tag.highway.footway = 1,1,5, foot

wtr.tag.surface.paving_stones = 2,1,1, foot

wtr.tag.surface.asphalt = 2,1,4, foot

1

Seems, you are only interested in pedestrian routing...

but pay attention to the surface tags because they may also be attached to other types. I assume, your example above catches almost everything, including bridges, roads, steps, etc.

In order to raise "surface" to some kind of artificial "main" tag try this (I havent tested it ... but it should work):

wtr.flagList = foot, surf
wtr.finalMask = foot|surf&foot
wtr.tag.surface.asphalt = 1, 2, 4, surf
wtr.tag.highway.[pedestrian|footway] = 2, 1, 5, foot
wtr.allow.highway.[pedestrian|footway] = foot

Important here is the first parameter - the priority - so if both are tagged, the surface clazz and speed "wins". The additional wtr.allow is due to the fact, that osm2po ignores everything behind a lower wtr.tag definition. Which is correct but not for the optional last parameter. This is an issue and will be fixed soon. In the meantime use the additional wtr.allow decl.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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