由于arcgis 发布要素服务需要数据库,所以选择开源的支持空间数据较好的postgresql数据库。

一:postgresql的下载与安装:

    1.1、下载官方地址:https://www.postgresql.org/download/(一定要下载含有postgis的版本)

arcgis+postgresql将osm数据发布成要素服务

arcgis+postgresql将osm数据发布成要素服务

1.2:安装

  参考此教程:https://jingyan.baidu.com/article/e75057f2c6f6eaebc91a89ed.html

1.3:建立数据库

1.3.1、打开navicat 

1.3.2、连接postgresql数据库

1.3.3、建立数据库

arcgis+postgresql将osm数据发布成要素服务

点击确定就建立成功

arcgis+postgresql将osm数据发布成要素服务


二、数据导入数据库

2.1、打开arcmap,连接postgresql数据库

arcgis+postgresql将osm数据发布成要素服务

2.2、将空间数据导入postgresql中

2.2.1、打开要发布的shp数据

arcgis+postgresql将osm数据发布成要素服务

2.2.2、将arccatalog和postgresql数据库连接

arcgis+postgresql将osm数据发布成要素服务

2.2.3、连接信息

arcgis+postgresql将osm数据发布成要素服务

点击ok,出现如下情况,表示连接成功

arcgis+postgresql将osm数据发布成要素服务

2.2.4、要素添加到postgresql数据库中

arcgis+postgresql将osm数据发布成要素服务

2.2.5、点击feature class(single)

arcgis+postgresql将osm数据发布成要素服务

2.2.6、点击确定,等待数据导入,如果导入成功,则出现下图的所示

arcgis+postgresql将osm数据发布成要素服务

2.2.7、依次将其他数据按照这种方式都加入到postgresql数据库中

三:要素服务的发布

3.1、关闭直接打开的shp数据,留下数库中的数据

arcgis+postgresql将osm数据发布成要素服务

3.2、开始发布要素服务。file-》share as ->service

arcgis+postgresql将osm数据发布成要素服务

点击下一步

arcgis+postgresql将osm数据发布成要素服务

点击一下一布

arcgis+postgresql将osm数据发布成要素服务

点击下一步

arcgis+postgresql将osm数据发布成要素服务

选择发布服务类型

arcgis+postgresql将osm数据发布成要素服务

分析是否存在错误

arcgis+postgresql将osm数据发布成要素服务

arcgis+postgresql将osm数据发布成要素服务

有错误,下边解决错误,

第一个错误:SEVERITY STATUSCODEDESCRIPTIONNAMETYPEDATA FRAME

High Unresolved00090Feature service requires a registered databaseLayersData FrameLayers

这个错误是没有和数据库关联起来,需要数据库

双击第一个错误,出现如图arcgis+postgresql将osm数据发布成要素服务

点击加号添加数据库

arcgis+postgresql将osm数据发布成要素服务

arcgis+postgresql将osm数据发布成要素服务

arcgis+postgresql将osm数据发布成要素服务

arcgis+postgresql将osm数据发布成要素服务


点击ok,

arcgis+postgresql将osm数据发布成要素服务

点击ok

arcgis+postgresql将osm数据发布成要素服务

点击确定

arcgis+postgresql将osm数据发布成要素服务

解决第二个错误

SEVERITY STATUSCODEDESCRIPTIONNAMETYPEDATA FRAME
High Unresolved00002Data frame does not have a spatial referenceLayersData FrameLayers

没有坐标,需要点击坐标

双击错误,

arcgis+postgresql将osm数据发布成要素服务

错误全部消失,点击发布,

arcgis+postgresql将osm数据发布成要素服务

发布成功

arcgis+postgresql将osm数据发布成要素服务

3.3、浏览器查看发布的服务

浏览器输入https://localhost:6443/arcgis/manager/service

arcgis+postgresql将osm数据发布成要素服务

输入账号和密码

arcgis+postgresql将osm数据发布成要素服务


arcgis+postgresql将osm数据发布成要素服务

arcgis+postgresql将osm数据发布成要素服务

arcgis+postgresql将osm数据发布成要素服务

arcgis+postgresql将osm数据发布成要素服务

 

相关文章: