【问题标题】:How to import SHP file into docker PostgreSQL container?如何将 SHP 文件导入 docker PostgreSQL 容器?
【发布时间】:2016-05-30 15:43:10
【问题描述】:

神圣专家,

我正在尝试将“post_pl.shp”文件导入 PostgreSQL 容器。

我已经成功用这个命令导入osm文件了:

osm2pgsql -H 172.17.0.2  -U postgres -d gis --hstore -s -S ./osm_stylesheet ./hessen-latest.osm.pbf

现在我需要对 post_pl.shp 做同样的事情。

Tnx

安德烈

【问题讨论】:

    标签: postgresql docker openstreetmap postgis psql


    【解决方案1】:

    我已经解决了:

    要上传 shp 文件,这样做:

    shp2pgsql -I -s 4326 -W "latin1" post_pl.shp post_pl  > post_pl.sql
    
    psql -h 172.17.0.2  U postgres -d gis -f post_pl.sql
    

    【讨论】:

      猜你喜欢
      • 2021-04-11
      • 2017-01-06
      • 2022-10-08
      • 2015-08-17
      • 2016-07-14
      • 1970-01-01
      • 1970-01-01
      • 2018-08-11
      相关资源
      最近更新 更多