geo_s2cell_to_central_point()geo_s2cell_to_central_point()

计算表示 S2 单元格中心的地理空间坐标。Calculates the geospatial coordinates that represent the center of an S2 cell.

详细了解 S2 单元格层次结构Read more about S2 cell hierarchy.

语法Syntax

geo_s2cell_to_central_point(s2cell)geo_s2cell_to_central_point(s2cell)

参数Arguments

s2cell:由 geo_point_to_s2cell() 计算得出的 S2 单元格令牌字符串值。s2cell: S2 cell token string value as it was calculated by geo_point_to_s2cell(). S2 单元格令牌的最大字符串长度为 16 个字符。The S2 cell token maximum string length is 16 characters.

返回Returns

地理空间坐标值采用 GeoJSON 格式,属于动态数据类型。The geospatial coordinate values in GeoJSON Format and of a dynamic data type. 如果 S2 单元格令牌无效,则查询会生成 null 结果。If the S2 cell token is invalid, the query will produce a null result.

备注

GeoJSON 格式先指定经度,再指定纬度。The GeoJSON format specifies longitude first and latitude second.

示例Examples

print point = geo_s2cell_to_central_point("1234567")
| extend coordinates = point.coordinates
| extend longitude = coordinates[0], latitude = coordinates[1]
pointpoint 坐标coordinates longitudelongitude latitudelatitude
{{
"type":"Point","type": "Point",
"coordinates": ["coordinates": [
9.86830731850408,9.86830731850408,
27.46839292582760427.468392925827604
]]
}}
[[
9.86830731850408,9.86830731850408,
27.46839292582760427.468392925827604
]]
9.868307318504089.86830731850408 27.468392925827627.4683929258276

下面的示例由于 S2 单元格令牌输入无效而返回 null 结果。The following example returns a null result because of the invalid S2 cell token input.

print point = geo_s2cell_to_central_point("a")
pointpoint