geo_s2cell_to_central_point()

计算表示 S2 单元格中心的地理空间坐标。

语法

geo_s2cell_to_central_point(s2cell)

详细了解语法约定

参数

客户 类型​​ 必需 说明
s2cell string geo_point_to_s2cell() 计算得出的 S2 单元格令牌值。 S2 单元格令牌的最大字符串长度为 16 个字符。

返回

地理空间坐标值采用 GeoJSON 格式,属于动态数据类型。 如果 S2 单元格令牌无效,则查询会生成 null 结果。

注意

GeoJSON 格式先指定经度,再指定纬度。

示例

print point = geo_s2cell_to_central_point("1234567")
| extend coordinates = point.coordinates
| extend longitude = coordinates[0], latitude = coordinates[1]

输出

point 坐标 longitude latitude
{
"type":"Point",
"coordinates": [
9.86830731850408,
27.468392925827604
]
}
[
9.86830731850408,
27.468392925827604
]
9.86830731850408 27.4683929258276

下面的示例由于 S2 单元格令牌输入无效而返回 null 结果。

print point = geo_s2cell_to_central_point("a")

输出

point