【发布时间】:2016-10-21 00:48:48
【问题描述】:
我下载了我县的 osm 地图并创建了空间 pg 数据库。我使用以下命令通过 osm2pgrouting 导出的 osm 文件:
osm2pgrouting -f myCity.osm -c mapconfig.xml -d postgis_db -U postgres -W postgres --addnodes --clean
导出表后,我有了这个架构:
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
你能告诉我我做错了什么吗?如何使用城市和街道等所有节点将 osm 文件导入数据库?感谢您的回答。
【问题讨论】:
-
你到底错过了什么?街道名称应该在ways.name 中。城市名称可能未导入。
-
在某种程度上是没有街道号码的街道名称,是否可以添加城市名称?我需要像这样的 root 城市 1 > city2, city2 > city3, city3 > city 4
-
osm2pgrouting 根据线路(街道、道路等)生成路由网络。城市是点,你必须分开处理。
标签: postgresql openstreetmap postgis pgrouting