山海鲸可视化

GIS影像

GIS 影像组件是鲸孪生内部的组件之一,需要手动添加,可以删除。每一个鲸孪生组件可以添加多个 GIS 影像。每在图层中顺序靠下的影像会叠加在顺序靠上的影像上面

1.影像的添加

目前山海鲸内置提供了一个默认的影像,点击 GIS,打开影像可以看到:
image.png
也可以点击加号添加自己的影像,目前山海鲸的 GIS 影像支持以下 6 种类型:
image.png
分别是:通用 URL 模板,WMTS,超图 Rest 接口,ArcGis Rest 接口,MVT,WMS。下面我们介绍一下较为常用的几个协议的接入方式,其他协议也可以参考这几种协议的接入:

1.1 通用 Url 模板

这一个是一个通用的 URL 接入方式,当接入影像是自定义协议时可以使用这一项,也可以作为其他协议的替代方案,Url 模板支持以下参数的设置(来自 CesiumJS 的接口文档):
{z}: The level of the tile in the tiling scheme. Level zero is the root of the quadtree pyramid.
{x}: The tile X coordinate in the tiling scheme, where 0 is the Westernmost tile.
{y}: The tile Y coordinate in the tiling scheme, where 0 is the Northernmost tile.
{s}: One of the available subdomains, used to overcome browser limits on the number of simultaneous requests per host.
{reverseX}: The tile X coordinate in the tiling scheme, where 0 is the Easternmost tile.
{reverseY}: The tile Y coordinate in the tiling scheme, where 0 is the Southernmost tile.
{reverseZ}: The level of the tile in the tiling scheme, where level zero is the maximum level of the quadtree pyramid. In order to use reverseZ, maximumLevel must be defined.
{westDegrees}: The Western edge of the tile in geodetic degrees.
{southDegrees}: The Southern edge of the tile in geodetic degrees.
{eastDegrees}: The Eastern edge of the tile in geodetic degrees.
{northDegrees}: The Northern edge of the tile in geodetic degrees.
{westProjected}: The Western edge of the tile in projected coordinates of the tiling scheme.
{southProjected}: The Southern edge of the tile in projected coordinates of the tiling scheme.
{eastProjected}: The Eastern edge of the tile in projected coordinates of the tiling scheme.
{northProjected}: The Northern edge of the tile in projected coordinates of the tiling scheme.
{width}: The width of each tile in pixels.
{height}: The height of each tile in pixels.
示例 URL 如下:
http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png

1.2 WMTS 协议

WMTS 是目前使用最广泛的底图接入服务,也是 OGC 的标准服务,具体协议的定义可以参考 OGC 官方文档。
image.png
如图所示,选择接入协议选择 WMTS,服务地址填入 WMTS 的根目录地址,这里我们使用超图 iServer 中的示例的 WMTS 的地址:http://localhost:8090/iserver/services/map-world/wmts100
【温馨提示】这个地址是我的本地地址,外网是无法测试使用的

填入之后,山海鲸会自动读取和解析 Capabilities 文件,如果输入地址是正确地址的话,Layer,Style 和 TileMatrixSetID 的选项就会自动设置成 Capabilities 中的选项:
image.png
选择好 Layer,Style 和 TileMatrixSetID 之后:
image.png
点击导入,就可以看到可以成功接入了:
image.png
WMTS 协议中一些高级的设置如最大层次细节和地图切片等等的设置都会自动从 Capabilities 中读取,就不需要主动设置了。

1.3 超图 Rest 接口

超图 Rest 接口的接入方式和 WMTS 类似,需要将生成的服务地址直接填入后,山海鲸会自动读取地址下的选项,这里我们使用 iServer 的示例地址: http://localhost:8090/iserver/services/map-world/rest
image.png
选择好目录和资源后,根据需要也可以调整高级设置,具体设置内容可以参考后面的章节 2.2 高级设置中的内容。
设置完了之后,点击导入即可完成超图 Rest 接口的接入。

2.影像的设置

GIS 影像组件上的设置整体分为两大类,分别是基本设置和高级设置。下面逐个进行介绍:

2.1 基本设置

配置项 说明
是否显示 是否显示 GIS 影像。

2.2 高级设置

配置项 说明
最大层次细节 层次细节越大,GIS 影像显示细节越丰富,占用性能越大。通常选用16-18作为层次细节,层次细节过小会导致 GIS 影像模糊,过大会导致 GIS 影像加载变慢
地图切片格式 可在此处选择 GIS 影像的地图切片格式为“Web 墨卡托投影”“平面 Carree 投影”
经纬度限制 GIS 影像只会显示在该经纬度限制区域以内的模型。
注意选择Web 墨卡托投影后,南北的纬度限制会自动设置为 85 度
亮度 调整 GIS 影像整体亮度。
对比度 调整 GIS 影像整体对比度,使 GIS 影像中的黑白色彩对比更明显。
色相 调整 GIS 影像整体色相,偏向红色或偏向绿色。
饱和度 调整 GIS 影像整体饱和度,可以让 GIS 影像色彩更加暗淡或更加鲜艳。