你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
geo_s2cell_to_central_point()
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Calculates the geospatial coordinates that represent the center of an S2 cell.
Read more about S2 cell hierarchy.
Syntax
geo_s2cell_to_central_point(
s2cell)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
s2cell | string |
✔️ | S2 cell token value as it was calculated by geo_point_to_s2cell(). The S2 cell token maximum string length is 16 characters. |
Returns
The geospatial coordinate values in GeoJSON Format and of a dynamic data type. If the S2 cell token is invalid, the query will produce a null result.
Note
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]
Output
point | coordinates | longitude | latitude |
---|---|---|---|
{ "type": "Point", "coordinates": [ 9.86830731850408, 27.468392925827604 ] } |
[ 9.86830731850408, 27.468392925827604 ] |
9.86830731850408 | 27.4683929258276 |
The following example returns a null result because of the invalid S2 cell token input.
print point = geo_s2cell_to_central_point("a")
Output
point |
---|