OpenStreetMap数据导入


  • http://planet.openstreetmap.org/ 下载osm文件;
  • 通过EnterpriseDB安装postgresql、postgis;
  • 通过pgadmin.org安装pgadmin;
  • 通过homebrew安装osm2pgsql;
  • 创建数据库osm

createdb osm;
psql -d osm -c ‘CREATE EXTENSION postgis; CREATE EXTENSION hstore;’
osm2pgsql -c -d osm -H localhost -U postgres -W –slim CN.osm.pbf

osm2pgsql -c -d osm -H localhost -U osm -W -j CN.osm.pbf

转载自:https://blog.csdn.net/kaichao/article/details/51136283

You may also like...

退出移动版