pgRouting / osm2pgrouting

Import tool for OpenStreetMap data to pgRouting database
https://pgrouting.org
GNU General Public License v2.0
288 stars 112 forks source link

Missing tables: osm_way_classes, types and no class_id field. #239

Closed mrd closed 6 years ago

mrd commented 6 years ago

I've cloned and installed pgrouting and osm2pgrouting from github (as of July 16th, 2018) and run through the workshop tutorial from Boston (https://workshop.pgrouting.org/2.4.11/en/index.html).

osm2pgrouting -c mapconfig.xml -f BostonMA.osm -d city_routing -U ... -W ...

Creating tables... TABLE: ways_vertices_pgr created ... OK. TABLE: ways created ... OK. TABLE: pointsofinterest created ... OK. TABLE: configuration created ... OK.

However the workshop material says that tables such as osm_way_classes and osm_way_types should be created. I don't see them.

             List of relations

Schema | Name | Type
-------+--------------------------+---------- public | configuration | table
public | configuration_id_seq | sequence public | geography_columns | view
public | geometry_columns | view
public | pointsofinterest | table
public | pointsofinterest_pid_seq | sequence public | raster_columns | view
public | raster_overviews | view
public | spatial_ref_sys | table
public | ways | table
public | ways_gid_seq | sequence public | ways_vertices_pgr | table
public | ways_vertices_pgr_id_seq | sequence

OS: Debian Linux, PostgreSQL 9.4, PostGIS 2.1

cayetanobv commented 6 years ago

Hi @mrd ,

These tables are deprecated now. This workshop are outdated and these tables are not generated any more. You must find the same information you are looking for in configuration table. An example:

mydb> select * from myschema.configuration;

 id | tag_id |  tag_key  |     tag_value     | priority | maxspeed | maxspeed_forward | maxspeed_backward | force 
----+--------+-----------+-------------------+----------+----------+------------------+-------------------+-------
  1 |    201 | cycleway  | lane              |   [NULL] |       40 |               40 |                40 | N
  2 |    204 | cycleway  | opposite          |   [NULL] |       40 |               40 |                40 | N
  3 |    203 | cycleway  | opposite_lane     |   [NULL] |       40 |               40 |                40 | N
  4 |    202 | cycleway  | track             |   [NULL] |       40 |               40 |                40 | N
  5 |    120 | highway   | bridleway         |   [NULL] |       40 |               40 |                40 | N
  6 |    116 | highway   | bus_guideway      |   [NULL] |       40 |               40 |                40 | N
  7 |    121 | highway   | byway             |   [NULL] |       40 |               40 |                40 | N
  8 |    118 | highway   | cycleway          |   [NULL] |       40 |               40 |                40 | N
  9 |    119 | highway   | footway           |   [NULL] |       40 |               40 |                40 | N
 10 |    111 | highway   | living_street     |   [NULL] |       40 |               40 |                40 | N
 11 |    101 | highway   | motorway          |   [NULL] |       40 |               40 |                40 | N
 12 |    103 | highway   | motorway_junction |   [NULL] |       40 |               40 |                40 | N
 13 |    102 | highway   | motorway_link     |   [NULL] |       40 |               40 |                40 | N
 14 |    117 | highway   | path              |   [NULL] |       40 |               40 |                40 | N
 15 |    114 | highway   | pedestrian        |   [NULL] |       40 |               40 |                40 | N
 16 |    106 | highway   | primary           |   [NULL] |       40 |               40 |                40 | N
 17 |    107 | highway   | primary_link      |   [NULL] |       40 |               40 |                40 | N
 18 |    110 | highway   | residential       |   [NULL] |       40 |               40 |                40 | N
 19 |    100 | highway   | road              |   [NULL] |       40 |               40 |                40 | N
 20 |    108 | highway   | secondary         |   [NULL] |       40 |               40 |                40 | N
 21 |    124 | highway   | secondary_link    |   [NULL] |       40 |               40 |                40 | N
 22 |    112 | highway   | service           |   [NULL] |       40 |               40 |                40 | N
 23 |    115 | highway   | services          |   [NULL] |       40 |               40 |                40 | N
 24 |    122 | highway   | steps             |   [NULL] |       40 |               40 |                40 | N
 25 |    109 | highway   | tertiary          |   [NULL] |       40 |               40 |                40 | N
 26 |    125 | highway   | tertiary_link     |   [NULL] |       40 |               40 |                40 | N
 27 |    113 | highway   | track             |   [NULL] |       40 |               40 |                40 | N
 28 |    104 | highway   | trunk             |   [NULL] |       40 |               40 |                40 | N
 29 |    105 | highway   | trunk_link        |   [NULL] |       40 |               40 |                40 | N
 30 |    123 | highway   | unclassified      |   [NULL] |       40 |               40 |                40 | N
 31 |    401 | junction  | roundabout        |   [NULL] |       40 |               40 |                40 | N
 32 |    301 | tracktype | grade1            |   [NULL] |       40 |               40 |                40 | N
 33 |    302 | tracktype | grade2            |   [NULL] |       40 |               40 |                40 | N
 34 |    303 | tracktype | grade3            |   [NULL] |       40 |               40 |                40 | N
 35 |    304 | tracktype | grade4            |   [NULL] |       40 |               40 |                40 | N
 36 |    305 | tracktype | grade5            |   [NULL] |       40 |               40 |                40 | N
(36 rows)
mrd commented 6 years ago

Ok, sorry about that. Thanks.