1

I download osm map of my county and create spatial pg database. Osm file I've exported over osm2pgrouting with this command:

osm2pgrouting -f myCity.osm -c mapconfig.xml -d postgis_db -U postgres -W postgres --addnodes --clean 

after exporting tables i had this schema:

osm_node:
   -node_id
   -osm_id
   -lon
   -lat
   -numofuse
   -the_geom

osm_relations:
   -relation_id
   -type_id
   -class_id
   -name

osm_way_classes
   -class_id
   -type_id
   -name
   -priority
   -default_max_speed

osm_way_tags
   -class_id
   -way_id

osm_way_types
   -type_id
   -name

pointcloud_formats
   -pcid
   -srid
   -schema

relation_ways
   -relation_id
   -way_id
   -type

spatial_ref_sys
   -srid
   -auth_name
   -auth_srid
   -srtext
   -proj4text

ways
   -gid
   -class_id
   -length
   -length_m
   -name
   -source
   -target
   -x1
   -y1
   -x2
   -y2
   -cost
   -reverse_cost
   -cost_s
   -reverse_cost_s
   -rule
   -one_way
   -maxspeed_foward
   -maxspeed_backward
   -osm_id
   -source_osm
   -target_osm
   -priority
   -the_geom

ways_vertices_pgr
   -id
   -osm_id
   -cnt
   -cnt
   -chk
   -ein
   -eout
   -lon
   -lat
   -the_geom

Can you tell me what I do wrong? How can I import osm file to DB with all nodes like cities and streets? Thanks for answers.

Aligator
  • 737
  • 2
  • 10
  • 23
  • What are you missing exactly? Street names should be in ways.name. Cities names are probably not imported. – Tom-db Oct 21 '16 at 08:31
  • cross-posted: https://gis.stackexchange.com/questions/214996/exported-osm-database-do-not-contains-node-names – scai Oct 21 '16 at 08:36
  • in ways are street names without street number, and is possible add cities name ? I need root like this city1 > city2, city2 > city3, city3 > city 4 – Aligator Oct 21 '16 at 09:48
  • 1
    osm2pgrouting generates a routing network, based on lines (streets, roads etc...). Cities are points, you have to handle them separately. – Tom-db Oct 21 '16 at 12:24

1 Answers1

1

osm2pgrouting does not import house numbers, cities, etc. As noted above, it imports data needed for computing routes. There are other tools that also import OSM data into postGIS. See: http://wiki.openstreetmap.org/wiki/PostGIS

Some of these other tools import more data and tags but may not make tables suitable for routing.

Stephen Woodbridge
  • 1,100
  • 1
  • 8
  • 16
  • osm2pgrouting imports the OSM ID, so you can link data imported with other tools, for example with oms2psql. – dkastl Oct 22 '16 at 17:16