9

ArcGIS Desktop发布地形高程服务(DEM/DSM) - 孤草之魂

 2 years ago
source link: https://www.cnblogs.com/kk8085/p/17362255.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

ArcGIS Desktop发布地形高程服务(DEM/DSM)

在做ArcGIS三维时,地形服务的发布与普通地图服务的发布不一样,需要发布成ImageServer,切片格式选择LERC。

本文示例使用软件:

ArcGIS Desktop10.3.1

ArcGIS JS API4.16

注:ArcGIS在10.3.1以上版本才支持发布地形服务。

1、根据需要选择对应坐标系的地形数据,地形数据一般格式为tif或者img

ArcGIS存在两种模式,一种是球面模式,一种是平面模式,如果所示:

81544-20230428144114156-1859575659.png

 球面模式:以三维球面的形式展示,对应ArcGIS Pro里的Global Scene,在ArcGIS JS API中对应SceneView的属性viewingMode:global

球面模式支持坐标系包括:Web Mercator, WGS84, CGCS2000, Mars_2000_(Sphere), GCS_Mars_2000 or GCS_Moon_2000

平面模式:以平面模式搭载三维数据,类似球面展开。对应ArcGIS Pro里的Local Scene,在ArcGIS JS API中对应SceneView的属性viewingMode:local

平面模式支持的坐标系为各种平面坐标系。

一般情况下,我们三维采用的是球面模式,当给的地形数据非球面坐标系时,需要先进行坐标转换,比如客户提供的是国家2000坐标系的投影坐标系4527,那么需要先将数据转换成4490或4326等球面支持的坐标系。

2、在ArcMap的Catalog中找到要发布的地形,右键选择Share As Image Service:

81544-20230428145230466-773146190.png

3、设置好参数,并发布服务

发布步骤和普通地图服务发布一致,服务编辑需要更改:

1)      Caching 选择 Using titles from a cache,选择具体的切片方案或者导入切片方案;

注意:切片方案应与要叠加的影像数据一致,否则无法叠加,可以通过选择已经存在的对应的影像服务的切片方案或者切片方案xml文件

切片方案xml文件获取方式:ArcGIS切片服务获取切片方案xml文件(conf.xml)

2)      缓存-高级设置(Advanced Setting):

指定缓存目录(默认),兴趣区域(默认)

切片格式(Tile format):LERC

压缩(Compression):0.5为默认,世界影像、地区和城市选择0.1

81544-20230428145923173-903622575.png

选择分析后,如果没有问题,点击发布来发布地形服务,发布成功后通过rest可以访问到地形rest服务:

81544-20230428153003294-1935837642.png

注意查看rest服务中,format是LERC

4、使用ArcGIS JS API4.x调用地形服务:

const terrainLayer = new ElevationLayer({ url: terrain.url })
view.map.ground.layers.add(terrainLayer)
view.terrainLayer = terrainLayer

可以看到地形的起伏了效果:

81544-20230428153319427-248689022.png

<本文完>


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK