Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
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 '13 at 17:06

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
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. –  xcalibur666 Apr 22 '13 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...

share|improve this answer

Your Answer

 
discard

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.