5

I have a given table in postgreSQL with OSM data which is used for routing purposes in Java with PGRouting. There exist two columns which I don't understand. They belong to osm2po. They are labeled with "flags" and "clazz". I know, that flags describe the kind of road. It means, whether it is driveable by car, bike,... The problem now is, that I do not understand the meanings of the values in the column clazz. I just know that they also describe the road type. Can anybody explain, what the values like 12, 15, 31,... mean? Does a documentation exist where the meaning of the values is written down?

3

The file osm2po.config, which can be obtained from the downloads tab on the osm2po page, contains a table with four column, defined as:

1) concurrent order

2) class (1-127)

3) default speed in kmh

4) allowed transportation type (optional) - since v4.5.30

And here are some sample rows, which I think explain where the 12, 51, etc, you are seeing comes from (in the second column).

wtr.tag.highway.motorway =       1, 11, 120, car
wtr.tag.highway.motorway_link =  1, 12, 30,  car
wtr.tag.highway.service =        1, 51, 5,   car|bike
wtr.tag.highway.living_street =  1, 63, 7,   car|bike|foot  

It does say that the class can be in the range 1-127, and there are only 23 different values in that config table, so I trust that covers all the ones you are seeing?

Following comment from OP, here are the the official osm highway docs

  • Yeah, you're right. The config file contains all possible values of classes. Each value can be assigned to a specific highway type. The descriptions of every type can be found in the OSM wiki (wiki.openstreetmap.org/wiki/DE:Key:highway). Thanks, your answer helped a lot :) – Bine Oct 9 '14 at 13:57
  • You are welcome. I added your link to the question, but in English, as my German is a bit rusty :D – John Powell Oct 9 '14 at 14:28
3

As for the flags, I just wrote up a little explanation here. I wish I would have figured the flags out a while ago! Very useful, and a clever encoding.

  • This link is dead. This answer is no longer useful, unfortunately. – scai May 23 '18 at 7:04
  • 1
    Ideally add the explanation from your link to your answer. This will improve your answer and prevent having the same problem again in the future. Link-only answers are discouraged. – scai May 24 '18 at 17:29
2

From the osm2po.config file:

road type       clazz
motorway        11
motorway_link   12
trunk           13
trunk_link      14
primary         15
primary_link    16
secondary       21
secondary_link  22
tertiary        31
tertiary_link   32
residential     41
road            42
unclassified    43

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.