I'm using osm2pgsql to populate a North America OSM database from planet.osm.
I like how simple the resulting PostGIS schema is, but I'm a bit confused by its contents.
I have the two tables
planet_osm_line. I assumed that planet_osm_roads contained all the highway data, but then discovered that it only contains a fraction of the roads in some of the 'highway' types.
For example, planet_osm_line has over 12,000,000 lines with a 'highway' value of 'residential'. However, planet_osm_roads has only 2,000. By comparison both tables have the same number of 'motorway' features. Looking at the data I can't tell why some features would be in the one table but not the other.
I'd really like to see the rules the osm2pgsql uses to direct line features into each table.
I tried looking through the osm2pgsql source code to shed light on the mystery but so far I've not found what I'm after.
Any suggestions very welcome.