Does anyone know, if it is possible to make osm2po able to load extra road data into SQL file, such as the surface tag? [1] I know it is not much used, but when it is, it would be nice to know if the surface is solid or soft.

I am able to set a category by using tags, .e.g., wtr.tag.surface.gravel, but then I can only set it to another category. It would be nice if I could pass on both the category and the surface :)

Any good ideas?

[1] http://wiki.openstreetmap.org/wiki/Key:surface

  • Yes, the miracle bag osm2po can even handle this. One question: Are you going to configure it or are there some Java Skills in background?
    – Carsten
    Apr 18, 2013 at 17:06

2 Answers 2


This is an old feature introduced prior to 4.7.7. Open the osm2po.config file and look for lines starting with wtr.allow... wtr.deny... - Now, don't think of allow/deny - rather think of set bit and unset bit in a user defined 32-Bit-Integer. You'll find this integer inside the resulting pgRouting-table (column flags). So, if you're going to store the information surface=asphalt , add sth. like this:

wtr.flaglist = car | asphalt
wtr.finalmask = car
wtr.allow.surface.asphalt = asphalt

Sounds a bit crazy in this case as each surface will reserve one bit and combinations of surfaces don't make sense at all. Indeed, it would be better to transport this information as an increasing number, which reserves the lower bits e.g. But therefore, you'll have to override the osm2po-API.

  • Oh yes, I see. That makes sense, and I will try to see if I can make any smart usage of this. I've realized, that it is very few roads that do have any useful (and correct) information on the surface, but I will try to experiment a bit with this taking up a bit to the surface. Thank you very much. Apr 22, 2013 at 9:14

It looks like the last version of osm2po 4.7.7 has similar feature that is declared as "Extensible Graph-File. Meaning, you can add custom data to the container in case you need a custom routing." but no any details provided...

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.