Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have imported the entire UK OSM dataset using the excellent osm2po. The metatdata of the imported table is shown below and my question is whether any of the columns map to ROAD TYPE. If not may I instruct osm2po to include road type as one additional column?

Of course, I wish to do this in order to help estimate accurate costs for different types of journey.

Many thanks,

        Table "public.result_2po_4pgr"
    Column     |       Type        | Modifiers 
 id            | integer           | not null
 osm_id        | bigint            | 
 osm_name      | character varying | 
 osm_source_id | bigint            | 
 osm_target_id | bigint            | 
 clazz         | integer           | 
 flags         | integer           | 
 source        | integer           | 
 target        | integer           | 
 km            | double precision  | 
 kmh           | integer           | 
 cost          | double precision  | 
 reverse_cost  | double precision  | 
 x1            | double precision  | 
 y1            | double precision  | 
 x2            | double precision  | 
 y2            | double precision  | 
 geom_way      | geometry          | 
share|improve this question
up vote 4 down vote accepted

The attribute you are looking for is the clazz column. Tipp: Compare the values to those configured in the osm2po.config file.

share|improve this answer
Ok great: this works. In the osm2po.config file the tag wtr.tag.highway.motorway has values 1, 11, 120. I search for objects with clazz==11 in Quantum and, sure enough, the UK motorways are highlighted. – John Steedman Sep 7 '12 at 10:28

Yes..the column geom_way is actually the column/value you are looking for(i hope i ve understood your question properly) and its type is geometry type.In other words value in this column is the "Geometry" that will represent the "Road" on the map. You can ofcourse extract this geometry into various types like WKT format using functions like ST_AsText. My experience suggests that the columns source and target are the node ids allocated by osm2po and can be used for routing algorithm (pgrouting).The column cost represents the cost you are probably looking also have a high reverse cost (like 100000) that represents that "This way is one way".

share|improve this answer
geom_way is the wkb for the road (line) geometry – Carsten Sep 6 '12 at 18:15

Your Answer


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.