# 矢量数据连接
# 获取矢量数据连接列表
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/list
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符,如为 * 则表示不过滤帐户 |
# 请求参数:
参数名称 | 类型 | 可选值 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|---|
search | String | - | 否 | - | 搜索的文本 |
sortField | String | - | 否 | createdAt | 排序的字段 |
sortType | String | desc | asc | 否 | desc | 排序的类型 |
offset | Number | - | 否 | 0 | 返回结果的偏移量,用于分页 |
limit | Number | - | 否 | 11 | 返回结果的数量,用于分页 |
# 请求示例
GET http://host:port/heycloud/api/data/vdataconnector/list?search=&offset=0&limit=11
# 正确响应示例:
{
"result": [
{
"id": "a8e8fd97-d568-4d16-8ce7-18eba1590f8c",
"accountId": null,
"type": "wfs3",
"title": "示例",
"parameters": { "url": "https://demo.pygeoapi.io/master/collections/utah_city_locations" },
"sr": "wgs-84",
"geomType": "Point",
"extent": null,
"createdAt": "2021-02-03T07:46:28.533Z"
}
]
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 获取 vdataconnector 的元数据
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/meta
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符,如为 * 则表示不过滤帐户 |
# 请求参数:
参数名称 | 类型 | 可选值 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|---|
vdataconnectorId | String | - | 是 | - | 矢量数据连接的 ID |
# 请求示例
GET http://host:port/heycloud/api/data/vdataconnector/xxxxx/meta
# 正确响应示例:
{
"result": {
"id": "f7e3b616-3fa3-4dc9-b353-7fe9f2398fb8",
"accountId": "",
"type": "wfs3",
"title": "test2",
"parameters": {
"url": "https://geohey.com/apps/dataviz/634a716a633b42619473b98255c097a3/share?ak=N2M1MWVmMjA4MmJkNDc2ZGFiNDcwMzU3YzkyZjVhOTM"
},
"sr": "wgs-84",
"geomType": "Point",
"createdAt": "2021-03-04T09:58:45.121Z",
"attrFields": [],
"geomField": "_geom"
}
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 根据条件查询记录
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/query
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符,如为 * 则表示不过滤帐户 |
# 请求参数:
参数名称 | 类型 | 可选值 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|---|
filters | Object | - | 否 | - | 属性查询的条件,不同的 Connector 可以有不同的实现 |
geom | Object | - | 否 | - | 查询的几何对象,GeoJSON 格式 |
offset | Number | - | 否 | 0 | 返回结果的偏移量,用于分页 |
limit | Number | - | 否 | 11 | 返回结果的数量,用于分页 |
returnAttrFields | Array | - | 否 | - | 指定返回的属性字段,不同的 Connector 可能有不同的默认值 |
toWebMercator | Boolean | - | 否 | - | 坐标转换到 Web Mercator |
# 请求示例
POST http://host:port/heycloud/api/data/vdataconnector/xxxxx/query
{
"filters": {"country": "china"},
"geom": { type: 'Point', coordinates: [0, 0] },
"offset": 0,
"limit": 11,
"toWebMercator": true
}
# 正确响应示例:
{
"result": [
{
"gml_id": "SGID93_LOCATION_UDOTMAP_CITYLOCATIONS_0",
"CO_SEAT": "no",
"POP_1999": 2486,
"POP_SYM_99": 11,
"POP_2000": 3094,
"POP_SYM_00": 13,
"STATE": "Utah",
"_geom": { "type": "Point", "coordinates": [-12439750.284023657, 4924667.909629463] }
}
]
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 获取一条记录
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/get
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符,如为 * 则表示不过滤帐户 |
# 请求参数:
参数名称 | 类型 | 可选值 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|---|
findField | String | - | 是 | - | 查询的字段 |
findValue | * | - | 是 | - | 查询的值 |
returnAttrFields | Array | - | 否 | - | 指定返回的属性字段,不同的 Connector 可能有不同的默认值 |
toWebMercator | Boolean | - | 否 | - | 坐标转换到 Web Mercator |
# 请求示例
POST http://host:port/heycloud/api/data/vdataconnector/xxxxx/get
{
"findField": "STATE",
"findValue": "Utah",
"toWebMercator": true
}
# 正确响应示例:
{
"result": {
"gml_id": "SGID93_LOCATION_UDOTMAP_CITYLOCATIONS_0",
"CO_SEAT": "no",
"POP_1999": 2486,
"POP_SYM_99": 11,
"POP_2000": 3094,
"POP_SYM_00": 13,
"STATE": "Utah",
"_geom": { "type": "Point", "coordinates": [-12439750.284023657, 4924667.909629463] }
}
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 更新标题
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/updateTitle
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符,如为 * 则表示不过滤帐户 |
# 请求参数:
参数名称 | 类型 | 可选值 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|---|
title | String | - | 是 | - | 更新的标题 |
# 请求示例
POST http://host:port/heycloud/api/data/vdataconnector/xxxxx/updateTitle
{
title: "xxx"
}
# 正确响应示例:
{
"result": [
{
"title": "xxx"
}
]
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 等间隔分段法
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/breaks/equal-interval
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符 |
# 请求参数:
属性名称 | 类型 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|
vdataconnectorId | String | 是 | - | 数据集 ID |
breakCount | Number | 否 | 4 | 分段的数量 |
where | String | 否 | - | 查询的条件 |
limit | Number | 否 | 100 | 计算使用的记录数量,如为 <=0 的值则对数量不作限制 |
field | String | 否 | - | 用于分段的字段 |
# 请求示例
POST http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/breaks/equal-interval
{
"field": "id",
"breakCount": 8,
"where": "count>10"
}
# 正确响应示例:
{
"result": [0, 10, ..., 80]
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 分位数分段法
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/breaks/equal-count
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符 |
# 请求参数:
属性名称 | 类型 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|
vdataconnectorId | String | 是 | - | 数据集 ID |
breakCount | Number | 否 | 4 | 分段的数量 |
where | String | 否 | - | 查询的条件 |
limit | Number | 否 | 100 | 计算使用的记录数量,如为 <=0 的值则对数量不作限制 |
field | String | 否 | - | 用于分段的字段 |
# 请求示例
POST http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/breaks/equal-count
{
"field": "id",
"breakCount": 8,
"where": "count>10"
}
# 正确响应示例:
{
"result": [0, 10, ..., 80]
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 自然分段法
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/breaks/natural
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符 |
# 请求参数:
属性名称 | 类型 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|
vdataconnectorId | String | 是 | - | 数据集 ID |
breakCount | Number | 否 | 4 | 分段的数量 |
where | String | 否 | - | 查询的条件 |
limit | Number | 否 | 100 | 计算使用的记录数量,如为 <=0 的值则对数量不作限制 |
field | String | 否 | - | 用于分段的字段 |
# 请求示例
POST http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/breaks/natural
{
"field": "id",
"breakCount": 8,
"where": "count>10"
}
# 正确响应示例:
{
"result": [0, 10, ..., 80]
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 列举字段的不同值
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/stats/distinct
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符 |
# 请求参数:
属性名称 | 类型 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|
vdataconnectorId | String | 是 | - | 数据集 ID |
field | String | 是 | - | 用于计算的字段 |
where | String | 否 | - | 查询的条件 |
limit | Number | 否 | 100 | 计算使用的记录数量,如为 <=0 的值则对数量不作限制 |
# 请求示例
POST http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/stats/distinct
{
"field": "pop",
"where": "pop>0"
}
# 正确响应示例:
{
"result": [1.2, 2.4, 7.2]
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}
# 对字段进行聚合计算
# 请求 URL:
http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/stats/aggregation
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
x-heycloud-account-id | String | 是 | 帐号的唯一标识符 |
# 请求参数:
属性名称 | 类型 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|
vdataconnectorId | String | 是 | - | 数据集 ID |
field | String | 否 | - | 用于计算的字段 ,如聚合方法为 count 可不指定聚合字段 |
where | String | 否 | - | 查询的条件 |
geomField | String | 否 | - | 查询的几何字段 |
geom | Object | 否 | - | 查询的几何对象,GeoJSON 格式 |
method | String | 否 | mean | 统计的方法,取值可以为 sum/mean/median/mode/min/max/std/count |
# 请求示例
POST http://host:port/heycloud/api/data/vdataconnector/:vdataconnectorId/stats/aggregation
{
"field": "pop",
"where": "pop>0",
"method": "sum"
}
# 正确响应示例:
{
"result": 10.8
}
# 错误响应示例:
{
"error": "ERROR",
"message": "错误信息"
}