基于arcgis访问postgis的方法
一、连接界面(基于arcgis desktop 10.4.1版本)
postgresql数据库ipv4配置参数情况:
配置文件:D:\Program Files\PostgreSQL\9.4\data\pg_hba.conf
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 0.0.0.0/0 trust
# IPv6 local connections:
host all all ::1/128 md5
访问本机实例Instance应填写IP地址:127.0.0.1
否则如果填写localhost,连接时会报错,不能连接上
二、在数据库中创建扩展功能
create extension postgis;
三、创建企业级地理数据库
注意:Instance:填localhost或127.0.0.1可能会报错,这里我改填为具体IP地址:192.168.3.22
注意:sde数据库用户在此功能中自动生成
arcmap10.4.1桌面版和postgres9.4版中连接设置参数
64位机
1、安装postgresql9.4.x 参考地址:https://blog.csdn.net/hsg77/article/details/105969696?spm=1001.2014.3001.5501
2、安装arcgis 10.4桌面版
4、将D:\ArcGIS\Desktop10.4\DatabaseSupport\PostgreSQL\9.4\Windows64下的
st_geometry.dll、libst_raster_pg.dll文件复制到postgresql\9.4\lib\下
5、将postgresql\9.4\bin\下的libeay32.dll、libintl-8.dll、libpq.dll、libiconv-2.dll、ssleay32.dll复制到arcgis\bin下
执行后的结果图:
test数据库中情况图:
四、连接到test 空间数据库 by SDE 用户
五、启用地理数据库
启用界面:
启用企业地理数据库工具在现有数据库中创建地理数据库系统表、存储过程、函数和类型,从而启用数据库中的地理数据库功能。
The Enable Enterprise Geodatabase tool creates geodatabase system tables, stored procedures, functions, and types in an existing database, thereby enabling geodatabase functionality in the database.
—the—end—