GISBox

如何使用API集成功能?

GISBox(GIS 工具箱)支持使用 API 接口,打开 GISBox 软件后,我们可以在左侧工具栏中点击“设置”栏目,选择“集成开发”,然后点击右上角的“创建密钥”按钮添加 API 接口,其中“密钥ID”“安全密钥”作为 Auth 参数,用于验证用户身份或应用程序的合法性,点击查看相应教程 →Auth 参数


“密钥名称”指的是用于传递特定信息的键名,它通常出现在请求参数、HTTP 头部或响应数据中,当我们新增 key 时需要填写相应的“密钥名称”,如下图所示:


在右侧的操作中,我们可以更改“密钥名称”,如下图所示:


【温馨提示】GISBox 的 API 功能需要购买“企业版”套餐才能使用,如需使用,请点击“升级”按钮购买套餐。

1. 前置 URL

所有 API 接口请求的基础 URL 为:

主账号SaaS访问地址 + /api/v1

“主账号 SaaS 访问地址”可以在 GISBox 软件的“设置”“域名端口”中进行查看,如下图所示:


例如,假设主账号 SaaS 访问地址为:

http://192.168.31.122:42225

那么 API 接口的前置 URL 即为:

http://192.168.31.122:42225/api/v1

2. Auth 参数

为确保接口访问的安全性,每个接口请求都需要拼接以下参数进行校验,包括“密钥ID”“安全密钥(secret)”

名称类型必选说明
keystring生成的 key
timestampstring当前时间戳(毫秒)
signstring使用md5 对(keysecret、timestamp)拼接起来的字符串进行加密生成字符串(32位,不区分大小写)

示例如下:

http://192.168.31.122:42225/api/v1/task/list?key=06150cad-131c-4a13-88cf-90b7c4e76056×tamp=1736835697953&sign=1D1802A6A4BB9C8A603F696E1E0E3644

3. 响应格式

API 接口的响应数据遵循统一的格式,包含以下字段:

名称类型必选说明
successboolean是否成功
msgstring成功提示或错误描述
dataobject响应核心数据

4. 切片转换API

4.1 查询任务信息(GET)

4.1.1 接口地址

task/<id>/info

4.1.2 请求参数

字段类型必选说明
idstring任务 id

4.1.3 响应参数

字段类型必选说明
idstring任务 id
namestring任务名
statusstring任务状态(“pending”“running”“finished”“failed”“canceled”
typestring任务类型(枚举值,详见创建任务接口)
inputPathstring输入路径
outputPathstring输出路径
settingsobject任务设置
startTimeinteger开始时间戳
progressfloat当前进度(%)
spentTimeinteger已花费的时间(ms)
remainTimeinteger预估剩余时间(ms)
endTimeinteger结束时间戳

4.1.4 响应示例

{
  "success": true,
  "data": {
    "id": "ngcxb8xzf41x",
    "name": "我的倾斜模型",
    "status": "failed",
    "type": "GeneralModelSlicing",
    "inputPath": "C:\\Users\\admin\\AppData\\Local\\Temp\\6349b52ac052f1100a0099f56ae1360d",
    "outputPath": "C:\\Users\\admin\\Desktop\\rubbish\\大场景",
    "settings": {
      "fileRange": [2, 20],
      "sceneTree": true,
      "is3DTiles1_1": true,
      "enableLOD": true,
      "textureCompressionFormat": "webp",
      "vertexCompress": false,
      "vertexCompressionLevel": 5,
      "x": 120.14757537841797,
      "y": 30.274856567382812,
      "z": 0,
      "name": "西湖区建筑模型",
      "imageRatio": 0.5
    },
    "startTime": 1736838996442,
    "endTime": 1736841982291
  },
  "msg": "请求成功"
}

4.2 查询任务列表(GET)

4.2.1 接口地址

task/list

4.2.2 请求参数

字段类型必选说明
pageinteger页码
pageSizeinteger每页条数
statusenum任务状态(“pending”“running”“finished”“failed”“canceled”

4.2.3 响应参数

字段类型必选说明
taskListarray任务列表
totalCountinteger任务总数

4.2.4 响应示例

{
  "success": true,
  "data": {
      taskList: [
        {
          "id": "ngcxb8xzf41x",
          "name": "我的倾斜模型",
          "status": "running",
          "type": "GeneralModelSlicing",
          "inputPath": "C:\\Users\\admin\\AppData\\Local\\Temp\\6349b52ac052f1100a0099f56ae1360d",
          "outputPath": "C:\\Users\\admin\\Desktop\\rubbish\\大场景",
          "settings": {
            "fileRange": [
              2,
              20
            ],
            "sceneTree": true,
            "is3DTiles1_1": true,
            "enableLOD": true,
            "textureCompressionFormat": "webp",
            "vertexCompress": false,
            "vertexCompressionLevel": 5,
            "x": 120.14757537841797,
            "y": 30.274856567382812,
            "z": 0,
            "name": "西湖区建筑模型",
            "imageRatio": 0.5
          },
          "startTime": 1736838996442,
          "progress": 0,
          "spentTime": 0,
          "remainTime": 0
        },
        {
          "id": "xoeqj7jrw9fl",
          "name": "我的倾斜模型",
          "status": "finished",
          "type": "GeneralModelSlicing",
          "inputPath": "C:\\Users\\admin\\AppData\\Local\\Temp\\c8f9e1d5c211b16dc34c5181922dc911",
          "outputPath": "C:\\Users\\admin\\Desktop\\rubbish\\新建文件夹 (2)",
          "settings": {
            "fileRange": [
              2,
              20
            ],
            "sceneTree": true,
            "is3DTiles1_1": true,
            "enableLOD": true,
            "textureCompressionFormat": "webp",
            "vertexCompress": false,
            "vertexCompressionLevel": 5,
            "x": 120.19058749999999,
            "y": 30.280553849999997,
            "z": 0,
            "name": "上城区建筑模型",
            "imageRatio": 0.5
          },
        "startTime": 1736838648314,
        "endTime": 1736838670124
      },
    ],
   totalCount: 100
   }
   "msg": "请求成功"
 }

4.3 新建任务POST

4.3.1 接口地址

task/create

4.3.2 请求参数

Body 类型:

application/json

4.3.2.1 请求参数

字段类型必选说明
optionsobject
typestring任务类型,枚举值如下:
"ImageSlicing"
"TerrainSlicing"
"TiltModelSlicing"
"GeneralModelSlicing"
"RvtModelSlicing"
"Tiles2OsgbSlicing"
"PointCloudSlicing"
"GaussianSplattingSlicing"
"I3S2OSGB"
"S3m2OsgbSlicing"
"Hash2Compact"
"Compact2Hash"
"IFC23DTiles"
"Osgb2GlbSlicing"
"GaussianSplattingPly2Glb3dTiles"
"TilesOptimize"
namestring任务名称
inputPathstring输入路径
outputPathstring输出路径
autoStartboolean是否立即开始任务(默认为 true)
isPublishboolean是否在处理完成后自动发布为分发服务(默认为false)
isCompactboolean是否输出紧凑格式(.gbp文件)
settingsobject各类型任务的特有设置项(不同类型的settings各不相同,下面会介绍)

4.3.2.2 各类型任务的settings参数

(1)影像切片
字段类型必选说明
tilesizeinteger默认为256
minzoominteger最小级别(默认为0)
maxzoominteger最大级别(为空时自动计算)
servicestring服务类型("TMS" | "WMTS")
toSrsinteger投影参数(3857、4326)
backgroundstring背景透明(“auto”、“255,255,255”)
colorStretchingobject颜色拉伸配置
typestring颜色拉伸类型("deviationAndZoom"-偏移缩放,"theMostValuable"-最值,"percent"-百分比)
deviationnumber偏移量(偏移缩放时填写,默认为0)
zoomnumber缩放系数(偏移缩放时填写,默认为0不缩放)
minnumber最小值(最值模式填写)
maxnumber最大值(最值模式填写)
minPercentnumber低阈值(%)(百分比模式填写))
maxPercentnumber高阈值(%)(百分比模式填写)
hasWaterMarkboolean是否生成水印
waterMarkobject水印设置
typestring水印类型("image" | "text")
textstring水印文本
fontSizenumber水印文本字号(px)
fontColorstring水印文本颜色(如"#000000")
opacitynumber水印透明度(0-1)
rotatenumber水印旋转(deg)
positionstring水印位置("topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "center")
imagePathstring水印图片路径
imageWidthRationumber水印图片宽度比例(0-1)
fromSrsinteger | string空间参考(epsg-code如3857或wkt字符串;为空时自动识别,识别失败时按照3857处理)
(.tiff格式可填写该设置项,非tiff格式不用填)
topLeft[number,number]左上角经纬度(非tiff格式时必填,tiff格式不用填)
topRight[number,number]右上角经纬度(非tiff格式时必填,tiff格式不用填)
bottomRight[number,number]右下角经纬度(非tiff格式时必填,tiff格式不用填)
(2)地形切片
字段类型必选说明
waterFilePathstring水面文件路径
(3)倾斜摄影切片
字段类型必选说明
srsstring空间参考(为空时自动识别)
srsOriginstring零点坐标(为空时自动识别)
isRebuildTopboolean是否重建顶层
maxConcurrencyinteger顶层重建最大并发数(为空自动计算)
textureFormatstring纹理压缩类别("default" | "webp" | "uastc" | "etc1s")
vertexCompressboolean是否压缩顶点
vertexCompressionLevelinteger顶点压缩级别(0|5|10,默认为5)
backFaceCullingboolean是否背面裁剪
computedNormalboolean是否计算法线
mandatoryDoubleSideboolean是否强制双面
unlitboolean是否开启无光照
is3DTiles1_1boolean是否输出3dtiles1.1
4)通用模型切片 (GeneralModelSlicing)
字段类型必选说明
coordinateSystemConversionboolean是否转换坐标系
srsstring空间参考(默认为"EPSG:3857")
xnumber零点坐标(默认120)
ynumber零点坐标(默认38)
znumber零点坐标(默认0)
enableLODboolean是否生成lod
fileRange[number, number]大小参数(MB)(默认为[2,20])
textureCompressionFormatenum纹理压缩类型("default" | "webp" | "avif" | "uastc" | "etc1s")
vertexCompressboolean是否压缩顶点
filpNormalsboolean是否翻转法线
mandatoryDoubleSideboolean是否强制双面
unlitboolean是否开启无光照
is3DTiles1_1boolean是否输出3DTiles1.1
(5)RVT模型切片(目前仅支持Windows)RvtModelSlicing

(6)IFC模型切片(IFC23DTiles)

(7)3DTiles转OSGB(Tiles2OsgbSlicing)
字段类型必选说明
srsstring空间参考(默认为"EPSG:4547")
srsOriginstring零点坐标(默认为"0,0,0")
upAxisenum向上轴("X" | "Y" | "Z")(默认为"Y")
maxConcurrencyinteger最大并发数(为空时自动计算)
(8)点云切片(PointCloudSlicing)
字段类型必选说明
colorIptnumber颜色偏移量(颜色计算公式(color+colorIpt) * colorType / dividendColor)(默认为0)
colorTypeenum颜色类型(255 | 65535)(默认255)
dividendColornumber颜色除数(默认65535)
srsstring空间参考(默认"EPSG:3857")
srsOriginstring零点坐标(默认"0,0,0")
isSaveColorboolean是否存储颜色
vertexCompressboolean是否压缩顶点
vertexCompressionLevelenum顶点压缩级别(0|5|10)(默认5)
isSelectAttributeboolean是否拾取属性
isXboolean是否拾取X
isYboolean是否拾取Y
isZboolean是否拾取Z
isIntensityboolean是否拾取Intensity
isClassificationboolean是否拾取classification
repairDiscreteDataboolean是否修复离散化
is3DTiles1_1boolean是否输出3dtiles1.1
(9)高斯泼溅切片(GaussianSplattingSlicing)
字段类型必选说明
srsstring空间参考(默认"ENU:30.282788,120.157471")
srsOriginstring零点坐标(默认"0,0,0")
is3DTiles1_1boolean是否输出3dtiles1.1
(10)高斯泼溅OPGS转3DTiles(GaussianSplattingPly2Glb3dTiles)

(11)I3S转OSGB(I3S2OSGB)

(12)S3M转OSGB(S3m2OsgbSlicing)

(13)3DTiles再处理(TilesOptimize)
字段类型必选说明
isRebuildTopboolean是否重建顶层
maxConcurrencyinteger顶层重建最大并发数(为空自动计算)
handledTopLayerWayenum("default" | "continue")(默认为"default")
textureFormatenum("default" | "webp" | "uastc" | "etc1s")
vertexCompressboolean是否压缩顶点
vertexCompressionLevelenum顶点压缩级别(0 | 5 | 10)(默认为5)
backFaceCullingboolean是否裁剪背面
computedNormalboolean是否计算法线
mandatoryDoubleSideboolean是否双面显示
unlitboolean是否开启无光照
is3DTiles1_1boolean是否输出3DTiles1.1
(14)散列转紧凑(Hash2Compact)

(15)紧凑转散列(Compact2Hash)

4.4 开始/重试/继续任务(POST)

4.4.1 接口地址

/task/<id>/start

4.4.2 请求参数

body参数

字段类型必选说明
isResumeboolean是否为继续处理(目前仅支持倾斜摄影切片、3DTiles再处理)

4.4.3 响应参数

字段类型必选说明
idstring任务 id

4.4.4 响应示例

{
  "success": true,
  "data": {
    "id": "4gtfbeg794p7"
  },
  "msg": "请求成功"
}

4.5 结束任务(POST)

4.5.1 接口地址

/task/<id>/stop

4.5.2 请求参数

字段类型必选说明
idstring任务 id

4.5.3 响应参数

字段类型必选说明
idstring任务id

4.5.4 响应示例

{
  "success": true,
  "data": {
    "id": "4gtfbeg794p7"
  },
  "msg": "请求成功"
}

4.6 删除任务(POST)

4.6.1 接口地址

/task/<id>/stop

4.6.2 请求参数

字段类型必选说明
idstring任务 id

4.6.3 响应参数

字段类型必选说明
idstring任务 id

4.6.4 响应示例

{
  "success": true,
  "data": {
    "id": "4gtfbeg794p7"
  },
  "msg": "请求成功"
}

5. 分发服务API

5.1 创建分发服务(POST)

5.1.1 接口地址

service/create

5.1.2 请求参数

字段类型必选说明
namestring
type ServiceEnum
connectionOptions object数据源连接参数(见各类服务数据源连接参数
gstyleInlineobject自定义样式(矢量服务可设置

5.1.3 请求示例

{
    "name": "测试矢量服务",
    
"type": "Vector",
   
"connectionOptions": {
    
    "type": "File",
       
     "dataPath": "C:/test.geojson"
    
     },
    
     "gstyleInline": {
            "format": "MBStyle",
       
             "dataSource": "FilePath",
       
              "filePath": "C:/MBStyle.json",
   
              }

}

5.1.4 响应参数

字段类型必选说明
idstring服务id

5.1.5 响应示例

{
    "success": true,
    "data": {
        "id": "m1w81k0n0joa"
    },
    "msg": "请求成功"
}

5.2 删除分发服务(POST)

5.2.1 接口地址

service/delete/{ids}

注:ids是逗号分隔的服务id序列。

5.2.2 请求参数

无Body参数

5.2.3 响应参数

5.2.4 响应参数

{
    "success": true,
    "msg": "请求成功"
}

5.3 编辑分发服务(POST)

5.3.1 接口地址

service/edit/{id}

5.3.2 请求参数

字段类型必选说明
name string服务名称
connectionOptions各类服务数据源连接参数
handlerOptionsobject 各类数据源额外参数
metadataobject 服务元数据
protocolsobject[]协议配置数组(见协议配置对象
gstyleobject 预定义样式设置
id  string预定义样式id
gstyleInlineobject 具体参数见GStyleInline
workspaceobject 工作空间设置
idstring工作空间id

5.3.3 请求示例

{
        "id": "ol8e0iig9du8",
        "name": "测试api发矢量服务",
        "type": "Vector",
        "protocols": [
            {
                "type": "WFS",
                "versions": [
                    "2.0.0"
                ],
                "enable": true,
                "settings": {}
            },
            {
                "type": "WMS",
                "versions": [
                    "1.1.1"
                ],
                "enable": true,
                "settings": {}
            },
            {
                "type": "WMTS",
                "versions": [
                    "1.0.0"
                ],
                "enable": true,
                "settings": {
                    "tileMatrixSetsControl": [
                        {
                            "id": "9222tj0cceil",
                            "name": "EPSG:4326",
                            "enableLimitZoomLevel": true,
                            "publicZoomLevel": [
                                0,
                                21
                            ],
                            "enableCache": true,
                            "cacheZoomLevel": [
                                0,
                                21
                            ]
                        },
                        {
                            "id": "zocdr2dw8dlz",
                            "name": "EPSG:3857",
                            "enableLimitZoomLevel": true,
                            "publicZoomLevel": [
                                0,
                                24
                            ],
                            "enableCache": true,
                            "cacheZoomLevel": [
                                0,
                                24
                            ]
                        }
                    ]
                }
            },
            {
                "type": "MVT",
                "versions": [
                    "2.1"
                ],
                "enable": true,
                "settings": {}
            }
        ],
        "metadata": {
            "originSrs": "EPSG:4326",
            "originSrsBounds": [
                119.9392247200012,
                26.59931051558265,
                120.05,
                26.7
            ],
            "lngLatBounds": [
                119.9392247200012,
                26.59931051558265,
                120.04999999999998,
                26.7
            ]
        },
        "sourceType": "GeoJSON",
        "connectionOptions": {
            "type": "File",
            "dataPath": "C:/test.geojson"
        },
        "handlerOptions": {},
        "gstyle": {
        	"id": qeaou2v3eveh"
        },
        "workspace": {
        	"id": "g4vmgebdpj12"
        }
    }

5.3.4 响应参数

5.4 开关服务(POST)

5.4.1 接口地址

service/switch/{id}

5.4.2 请求参数

字段类型必选说明
targetboolean是否开启

5.5 查询单条分发服务(GET)

5.5.1 接口地址

service/info/{id}

5.5.2 请求参数

5.5.3 响应参数

字段类型必选说明
idstring服务id
namestring
typeServiceEnum服务类型
createAtnumber创建时间戳
updateAtnumber修改时间戳
isActiveboolean服务是否开启
readyInfoobject服务准备信息
status"ready" | "preparing" | "error" | "not-ready"服务准备状态
protocolsobject[]服务协议配置(见协议配置对象
metadataobject服务元数据
connectionOptionsobject各类服务数据源连接参数
handlerOptionsobject各类服务数据源额外参数
gstylestring预定义样式id
workspacestring工作区id
tileMatrixSetsstring[]切片规则id数组

5.5.4 响应示例

{
    "success": true,
    "data": {
        "id": "ol8e0iig9du8",
        "name": "测试api发矢量服务",
        "type": "Vector",
        "createAt": 1768548714179,
        "updateAt": 1768548714179,
        "isActive": true,
        "readyInfo": {
            "status": "ready"
        },
        "protocols": [
            {
                "type": "WFS",
                "versions": [
                    "2.0.0"
                ],
                "enable": true,
                "settings": {}
            },
            {
                "type": "WMS",
                "versions": [
                    "1.1.1"
                ],
                "enable": true,
                "settings": {}
            },
            {
                "type": "WMTS",
                "versions": [
                    "1.0.0"
                ],
                "enable": true,
                "settings": {
                    "tileMatrixSetsControl": [
                        {
                            "id": "9222tj0cceil",
                            "name": "EPSG:4326",
                            "enableLimitZoomLevel": true,
                            "publicZoomLevel": [
                                0,
                                21
                            ],
                            "enableCache": true,
                            "cacheZoomLevel": [
                                0,
                                21
                            ]
                        },
                        {
                            "id": "zocdr2dw8dlz",
                            "name": "EPSG:3857",
                            "enableLimitZoomLevel": true,
                            "publicZoomLevel": [
                                0,
                                24
                            ],
                            "enableCache": true,
                            "cacheZoomLevel": [
                                0,
                                24
                            ]
                        }
                    ]
                }
            },
            {
                "type": "MVT",
                "versions": [
                    "2.1"
                ],
                "enable": true,
                "settings": {}
            }
        ],
        "metadata": {
            "originSrs": "EPSG:4326",
            "originSrsBounds": [
                119.9392247200012,
                26.59931051558265,
                120.05,
                26.7
            ],
            "lngLatBounds": [
                119.9392247200012,
                26.59931051558265,
                120.04999999999998,
                26.7
            ]
        },
        "sourceType": "GeoJSON",
        "connectionOptions": {
            "type": "File",
            "dataPath": "C:/test.geojson"
        },
        "handlerOptions": {},
        "gstyle": "qeaou2v3eveh",
        "workspace": "g4vmgebdpj12",
        "isRewriteFile": false,
        "sourceOptions": {},
        "tileMatrixSets": [
            "9222tj0cceil",
            "zocdr2dw8dlz"
        ]
    },
    "msg": "请求成功"
}

5.6 获取分发服务列表(POST)

5.6.1 接口地址

service/list

5.6.2 请求参数(Query参数)

字段类型必选说明
typestring服务类型(见ServiceEnum
key string关键词
pagenumber页数
pageSizenumber每页条数

5.6.2 请求示例

http://127.0.0.1:42231/api/v1/service/list?key=54fd75dd-df0c-4e8d-8179-3fe91cf8280a&
timestamp=1768368398843&sign=99949A6122970DE18192A396EABAC326&type=Vector&keyword&page=1&pageSize=1

5.6.3 响应参数

字段类型必选说明
listobject[]服务对象数组
totalnumber

5.6.4 响应示例

{
    "success": true,
    "data": {
        "list": [
            {
                "id": "ol8e0iig9du8",
                "_id_": "ol8e0iig9du8",
                "name": "测试api发矢量服务",
                "type": "Vector",
                "createAt": 1768548714179,
                "updateAt": 1768548714179,
                "isActive": true,
                "readyInfo": {
                    "status": "ready"
                },
                "protocols": [
                    {
                        "type": "WFS",
                        "versions": [
                            "2.0.0"
                        ],
                        "enable": true,
                        "settings": {}
                    },
                    {
                        "type": "WMS",
                        "versions": [
                            "1.1.1"
                        ],
                        "enable": true,
                        "settings": {}
                    },
                    {
                        "type": "WMTS",
                        "versions": [
                            "1.0.0"
                        ],
                        "enable": true,
                        "settings": {
                            "tileMatrixSetsControl": [
                                {
                                    "id": "9222tj0cceil",
                                    "name": "EPSG:4326",
                                    "enableLimitZoomLevel": true,
                                    "publicZoomLevel": [
                                        0,
                                        21
                                    ],
                                    "enableCache": true,
                                    "cacheZoomLevel": [
                                        0,
                                        21
                                    ]
                                },
                                {
                                    "id": "zocdr2dw8dlz",
                                    "name": "EPSG:3857",
                                    "enableLimitZoomLevel": true,
                                    "publicZoomLevel": [
                                        0,
                                        24
                                    ],
                                    "enableCache": true,
                                    "cacheZoomLevel": [
                                        0,
                                        24
                                    ]
                                }
                            ]
                        }
                    },
                    {
                        "type": "MVT",
                        "versions": [
                            "2.1"
                        ],
                        "enable": true,
                        "settings": {}
                    }
                ],
                "metadata": {
                    "originSrs": "EPSG:4326",
                    "originSrsBounds": [
                        119.9392247200012,
                        26.59931051558265,
                        120.05,
                        26.7
                    ],
                    "lngLatBounds": [
                        119.9392247200012,
                        26.59931051558265,
                        120.04999999999998,
                        26.7
                    ]
                },
                "sourceType": "GeoJSON",
                "connectionOptions": {
                    "type": "File",
                    "dataPath": "C:/Users/admin/Desktop/data/geojson/test1.geojson"
                },
                "handlerOptions": {},
                "gstyle": {
                    "id": "qeaou2v3eveh",
                    "name": "boundary_lines",
                    "format": "SLD",
                    "dataSource": "Content",
                    "isDefault": true,
                    "createAt": 1757904080085,
                    "updateAt": "2025-10-22T08:26:59.108Z"
                },
                "workspace": {
                    "id": "g4vmgebdpj12",
                    "name": "Default Workspace",
                    "nickName": "默认工作空间",
                    "isDefault": true,
                    "createAt": 1757645552702,
                    "updateAt": "2025-09-12T03:00:26.828Z"
                },
                "isRewriteFile": false,
                "sourceOptions": {},
                "tileMatrixSets": [
                    {
                        "id": "9222tj0cceil",
                        "key": "EPSG:4326",
                        "name": "EPSG:4326",
                        "crs": "EPSG:4326",
                        "bounds": [
                            -180,
                            -90,
                            180,
                            90
                        ],
                        "tileWidth": 256,
                        "tileHeight": 256,
                        "metersPerUnit": 111319.49079327358,
                        "tileMatrixs": [
                            {
                                "name": "0",
                                "matrixWidth": 2,
                                "matrixHeight": 1,
                                "pixelSize": 0.703125,
                                "scaleDenominator": 279541132.0143589
                            },
                            {
                                "name": "1",
                                "matrixWidth": 4,
                                "matrixHeight": 2,
                                "pixelSize": 0.3515625,
                                "scaleDenominator": 139770566.00717944
                            },
                            {
                                "name": "2",
                                "matrixWidth": 8,
                                "matrixHeight": 4,
                                "pixelSize": 0.17578125,
                                "scaleDenominator": 69885283.00358972
                            },
                            {
                                "name": "3",
                                "matrixWidth": 16,
                                "matrixHeight": 8,
                                "pixelSize": 0.087890625,
                                "scaleDenominator": 34942641.50179486
                            },
                            {
                                "name": "4",
                                "matrixWidth": 32,
                                "matrixHeight": 16,
                                "pixelSize": 0.0439453125,
                                "scaleDenominator": 17471320.75089743
                            },
                            {
                                "name": "5",
                                "matrixWidth": 64,
                                "matrixHeight": 32,
                                "pixelSize": 0.02197265625,
                                "scaleDenominator": 8735660.375448715
                            },
                            {
                                "name": "6",
                                "matrixWidth": 128,
                                "matrixHeight": 64,
                                "pixelSize": 0.010986328125,
                                "scaleDenominator": 4367830.1877243575
                            },
                            {
                                "name": "7",
                                "matrixWidth": 256,
                                "matrixHeight": 128,
                                "pixelSize": 0.0054931640625,
                                "scaleDenominator": 2183915.0938621787
                            },
                            {
                                "name": "8",
                                "matrixWidth": 512,
                                "matrixHeight": 256,
                                "pixelSize": 0.00274658203125,
                                "scaleDenominator": 1091957.5469310894
                            },
                            {
                                "name": "9",
                                "matrixWidth": 1024,
                                "matrixHeight": 512,
                                "pixelSize": 0.001373291015625,
                                "scaleDenominator": 545978.7734655447
                            },
                            {
                                "name": "10",
                                "matrixWidth": 2048,
                                "matrixHeight": 1024,
                                "pixelSize": 0.0006866455078125,
                                "scaleDenominator": 272989.38673277234
                            },
                            {
                                "name": "11",
                                "matrixWidth": 4096,
                                "matrixHeight": 2048,
                                "pixelSize": 0.00034332275390625,
                                "scaleDenominator": 136494.69336638617
                            },
                            {
                                "name": "12",
                                "matrixWidth": 8192,
                                "matrixHeight": 4096,
                                "pixelSize": 0.000171661376953125,
                                "scaleDenominator": 68247.34668319309
                            },
                            {
                                "name": "13",
                                "matrixWidth": 16384,
                                "matrixHeight": 8192,
                                "pixelSize": 0.0000858306884765625,
                                "scaleDenominator": 34123.67334159654
                            },
                            {
                                "name": "14",
                                "matrixWidth": 32768,
                                "matrixHeight": 16384,
                                "pixelSize": 0.00004291534423828125,
                                "scaleDenominator": 17061.83667079827
                            },
                            {
                                "name": "15",
                                "matrixWidth": 65536,
                                "matrixHeight": 32768,
                                "pixelSize": 0.000021457672119140625,
                                "scaleDenominator": 8530.918335399136
                            },
                            {
                                "name": "16",
                                "matrixWidth": 131072,
                                "matrixHeight": 65536,
                                "pixelSize": 0.000010728836059570312,
                                "scaleDenominator": 4265.459167699568
                            },
                            {
                                "name": "17",
                                "matrixWidth": 262144,
                                "matrixHeight": 131072,
                                "pixelSize": 0.000005364418029785156,
                                "scaleDenominator": 2132.729583849784
                            },
                            {
                                "name": "18",
                                "matrixWidth": 524288,
                                "matrixHeight": 262144,
                                "pixelSize": 0.000002682209014892578,
                                "scaleDenominator": 1066.364791924892
                            },
                            {
                                "name": "19",
                                "matrixWidth": 1048576,
                                "matrixHeight": 524288,
                                "pixelSize": 0.000001341104507446289,
                                "scaleDenominator": 533.182395962446
                            },
                            {
                                "name": "20",
                                "matrixWidth": 2097152,
                                "matrixHeight": 1048576,
                                "pixelSize": 6.705522537231445e-7,
                                "scaleDenominator": 266.591197981223
                            },
                            {
                                "name": "21",
                                "matrixWidth": 4194304,
                                "matrixHeight": 2097152,
                                "pixelSize": 3.3527612686157227e-7,
                                "scaleDenominator": 133.2955989906115
                            }
                        ],
                        "editable": false,
                        "createAt": 1766561117502,
                        "updateAt": 1766561117502
                    },
                    {
                        "id": "zocdr2dw8dlz",
                        "key": "EPSG:3857",
                        "name": "EPSG:3857",
                        "crs": "EPSG:3857",
                        "bounds": [
                            -20037508.34,
                            -20037508.34,
                            20037508.34,
                            20037508.34
                        ],
                        "tileWidth": 256,
                        "tileHeight": 256,
                        "metersPerUnit": 1,
                        "tileMatrixs": [
                            {
                                "name": "0",
                                "matrixWidth": 1,
                                "matrixHeight": 1,
                                "pixelSize": 156543.03392804076,
                                "scaleDenominator": 559082264.028717
                            },
                            {
                                "name": "1",
                                "matrixWidth": 2,
                                "matrixHeight": 2,
                                "pixelSize": 78271.51696402022,
                                "scaleDenominator": 279541132.014358
                            },
                            {
                                "name": "2",
                                "matrixWidth": 4,
                                "matrixHeight": 4,
                                "pixelSize": 39135.75848201011,
                                "scaleDenominator": 139770566.007179
                            },
                            {
                                "name": "3",
                                "matrixWidth": 8,
                                "matrixHeight": 8,
                                "pixelSize": 19567.879241005117,
                                "scaleDenominator": 69885283.0035897
                            },
                            {
                                "name": "4",
                                "matrixWidth": 16,
                                "matrixHeight": 16,
                                "pixelSize": 9783.939620502542,
                                "scaleDenominator": 34942641.5017948
                            },
                            {
                                "name": "5",
                                "matrixWidth": 32,
                                "matrixHeight": 32,
                                "pixelSize": 4891.969810251271,
                                "scaleDenominator": 17471320.7508974
                            },
                            {
                                "name": "6",
                                "matrixWidth": 64,
                                "matrixHeight": 64,
                                "pixelSize": 2445.9849051256383,
                                "scaleDenominator": 8735660.37544871
                            },
                            {
                                "name": "7",
                                "matrixWidth": 128,
                                "matrixHeight": 128,
                                "pixelSize": 1222.9924525628178,
                                "scaleDenominator": 4367830.18772435
                            },
                            {
                                "name": "8",
                                "matrixWidth": 256,
                                "matrixHeight": 256,
                                "pixelSize": 611.4962262814075,
                                "scaleDenominator": 2183915.09386217
                            },
                            {
                                "name": "9",
                                "matrixWidth": 512,
                                "matrixHeight": 512,
                                "pixelSize": 305.7481131407024,
                                "scaleDenominator": 1091957.54693108
                            },
                            {
                                "name": "10",
                                "matrixWidth": 1024,
                                "matrixHeight": 1024,
                                "pixelSize": 152.8740565703523,
                                "scaleDenominator": 545978.773465544
                            },
                            {
                                "name": "11",
                                "matrixWidth": 2048,
                                "matrixHeight": 2048,
                                "pixelSize": 76.43702828517615,
                                "scaleDenominator": 272989.386732772
                            },
                            {
                                "name": "12",
                                "matrixWidth": 4096,
                                "matrixHeight": 4096,
                                "pixelSize": 38.21851414258808,
                                "scaleDenominator": 136494.693366386
                            },
                            {
                                "name": "13",
                                "matrixWidth": 8192,
                                "matrixHeight": 8192,
                                "pixelSize": 19.10925707129404,
                                "scaleDenominator": 68247.346683193
                            },
                            {
                                "name": "14",
                                "matrixWidth": 16384,
                                "matrixHeight": 16384,
                                "pixelSize": 9.55462853564699,
                                "scaleDenominator": 34123.6733415964
                            },
                            {
                                "name": "15",
                                "matrixWidth": 32768,
                                "matrixHeight": 32768,
                                "pixelSize": 4.777314267823495,
                                "scaleDenominator": 17061.8366707982
                            },
                            {
                                "name": "16",
                                "matrixWidth": 65536,
                                "matrixHeight": 65536,
                                "pixelSize": 2.388657133911756,
                                "scaleDenominator": 8530.91833539913
                            },
                            {
                                "name": "17",
                                "matrixWidth": 131072,
                                "matrixHeight": 131072,
                                "pixelSize": 1.1943285669558765,
                                "scaleDenominator": 4265.45916769956
                            },
                            {
                                "name": "18",
                                "matrixWidth": 262144,
                                "matrixHeight": 262144,
                                "pixelSize": 0.5971642834779383,
                                "scaleDenominator": 2132.72958384978
                            },
                            {
                                "name": "19",
                                "matrixWidth": 524288,
                                "matrixHeight": 524288,
                                "pixelSize": 0.29858214173896913,
                                "scaleDenominator": 1066.36479192489
                            },
                            {
                                "name": "20",
                                "matrixWidth": 1048576,
                                "matrixHeight": 1048576,
                                "pixelSize": 0.14929107086948457,
                                "scaleDenominator": 533.182395962445
                            },
                            {
                                "name": "21",
                                "matrixWidth": 2097152,
                                "matrixHeight": 2097152,
                                "pixelSize": 0.07464553543474216,
                                "scaleDenominator": 266.591197981222
                            },
                            {
                                "name": "22",
                                "matrixWidth": 4194304,
                                "matrixHeight": 4194304,
                                "pixelSize": 0.03732276771737108,
                                "scaleDenominator": 133.295598990611
                            },
                            {
                                "name": "23",
                                "matrixWidth": 8388608,
                                "matrixHeight": 8388608,
                                "pixelSize": 0.018661383858685567,
                                "scaleDenominator": 66.6477994953056
                            },
                            {
                                "name": "24",
                                "matrixWidth": 16777216,
                                "matrixHeight": 16777216,
                                "pixelSize": 0.009330691929342784,
                                "scaleDenominator": 33.3238997476528
                            }
                        ],
                        "editable": false,
                        "createAt": 1766561117309,
                        "updateAt": 1766561117309
                    }
                ]
            }
        ],
        "total": 24
    },
    "msg": "请求成功"
}

5.7 获取服务地址(GET)

5.7.1 接口地址

service/url/{id}

5.7.2 请求参数(Query)

字段类型必选说明
protocolstring协议类型(见ServiceProtocolEnum

5.7.3 响应参数

字段类型必选说明
urlstring

6. 数据模型

6.1 服务

6.1.1 ServiceEnum(服务类型枚举)

说明
ThreeDTiles3DTiles
Terrain地形
Image2d栅格影像
Vector矢量
Assets其它资源

6.2 服务数据源

62.1 ServiceDataSourceEnum(服务数据源类型枚举)

说明
File文件
Database数据库
Remote其它服务
AssetsDir资源文件夹

6.2.2 各类服务数据源连接参数

6.2.2.1 文件类

字段类型必选说明
typestring"File"
dataPathstring文件地址

一、2d栅格影像服务支持
(1)栅格影像文件(.tiff、.tif)
(2)预切片文件(.json、.gbp)
二、2d矢量服务
(1)矢量文件(.json、.geojson、.shp、.gpkg、.kml、.gml、.dwg、.dxf)
三、3dtiles服务
(1).json、.gbp
四、地形服务
(1).json、.gbp





6.2.2.2 数据库

字段类型必选说明
typestring"Database"
dbTypestring"PostGIS"
hoststring
portstring
userstring
passwordstring
databasestring
schemastring"public"

6.2.2.3 其他服务

字段类型必选
typestring"Remote"
cacheboolean
protocolTypeServiceProtocolEnum协议类型
remoteURLstring服务地址

6.2.2.4 资源数据源

字段类型必选说明
typestring
"AssetsDir"
dataPathstring
mimeTypestring
assetsAddTypestring"addFilePath" | "addFileContent"

6.2.3 各类数据源额外参数

6.2.3.1 数据库数据源("Database")

字段类型必选说明
namestring表名

6.2.3.2 远程服务数据源("Remote")

字段类型必选
styleNamestring仅WMS协议
tileMatrixSetIDstring仅WMTS协议

6.3 服务协议

6.3.1 ServiceProtocolEnum(服务协议类型枚举)

说明
XYZ
WFS
WMTS
WMS
MVT
Assets
3DTiles
Terrain

6.3.2 协议配置对象

字段类型必选说明
idstring
服务id
versionsstring[]允许的协议版本(具体看下方的各协议可选版本
enableboolean是否启用
settingsobject协议配置参数(具体看各协议配置参数

6.3.3 各协议可选版本

协议版本
3DTiles"1.0" | "1.1"
WMS"1.1.1"
WMTS"1.0.0"
WFS"2.0.0"
MVT"2.1"

6.3.4 各协议配置参数

6.3.4.1 WMTS

字段类型必选说明
tileMatrixSetsControlTileMatrixSetsControl[]
6.3.4.1.1 TileMatrixSetsControl
字段类型必选说明
idstring
namestring
enableLimitZoomLevelboolean
publicZoomLevelnumber[]
enableCacheboolean
cacheZoomLevelnumber[]

6.4 服务元数据

6.4.1 3DTiles(ThreeDTiles)

字段类型必选
upAxis"Y" | "Z"向上轴,默认为"Y"

6.4.2 地形服务(Terrain)

字段类型必选说明
eastnumber
northnumber
westnumber
southnumber

6.4.3 栅格影像(Image)

字段类型必选说明
originSrsstring坐标系
lngLatBounds[number, number, number, number] 经纬度边界盒[西,南,东,北]

6.4.4 矢量服务(Vector)

字段类型必选说明
originSrsstringSRS
toSrsstring重投影SRS
isReprojboolean是否应用重投影
originSrsBounds[number, number, number, number]原始边界盒[西,南,东,北]
lngLatBounds[number, number, number, number]经纬度边界盒[西,南,东,北]

6.4.5 资源服务(Assets)

6.5 样式

6.5.1 GStyleFormat(样式格式枚举)

GeoStyler
SLD
MBStyleMapbox 样式格式
QGISStyleQGIS 样式格式
Mapfile
LYRX

6.5.2 GStyleInline(自定义样式)

字段类型必选说明
formatGStyleFormat
dataSource"FilePath" | "Content"
contentstringdataSource为"Content"时填写
filePathstringdataSource为"Content"时填写