1

How to combine allow / deny in osm2po config file for complex selection?

As an example, I would like to include in my finalmask (car) all [highway=service] except the ones that DO NOT have the tag [surface=asphalt]. I would like to use this asphalt restriction only for highway=service but not for other types of highways. What should I write in my osm2po config file to achieve this?

1 Answer 1

0

Since 5.2.72 the declaration format has changed. So I recommend to download the latest version (current is 5.2.84, link is on the download tab) There are some comments regarding this in the osm2po.config.

Example (new format): To allow roads and service ways set

wtr.finalMask=road,service

If not all service ways are allowed, set sth. like this here:

wtr.flagList=road,service,asphalt
wtr.finalMask=road,service|asphalt
wtr.allow.surface.asphalt=asphalt

Another approach is to think the whole matter more abstract. I haven't tested it yet, but this should work as well: (Tricky part: service has no flags by default)

wtr.flagList=car
wtr.finalMask=car
wtr.tag.highway.service = 1,51,5
wtr.tag.highway.motorway = 1,11,120,car
wtr.allow.surface.asphalt=car

If you prefer the technical and non-verbose version, here it is:

wtr.finalMask=0x1
wtr.tag.highway.service = 1,51,5
wtr.tag.highway.motorway = 1,11,120,0x1
wtr.allow.surface.asphalt=0x1
1
  • I tested with success the first approach.
    – nadp
    Mar 29, 2018 at 11:18

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.