在PgAdmin中创建空间拓展(创建空间数据库)的方法,并连接到空间数据库,导入数据表操作:
创建空间拓展
查询命令(SQL语句):
在指定数据库下安装postgis扩展模块:
create extension postgis;
连接空间数据库
打开PostGIS Shapefile Import/Export Manage,点击 View connection details… 输入数据库管理员账号postgres 和密码,最后一栏填写你所要连接的数据库名称。
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/6b1f2c2355833f6251d4c038ec623fcc.png)
导入数据表
点击Add File
,选中数据文件导入,以shp为后缀的文件为主要导入对象。
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/2652dc9a9165ca365cf44fc58dab0339.png)
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/ccc77e7986e78922809bf32831892ac2.png)
最后点击Import
即可。