This article is contributed. See the original author and article here.

The geospatial functions in Azure Data Explorer (ADX) received a big update in June 2021. Based on our research and very valuable feedback from our customers we decided to add support for H3 Cell tokens. On top of that we provided new functionality to generate polygons from all of our geospatial clustering functions.


H3 Cell token

Geospatial data can be analyzed efficiently using grid systems to create geospatial clusters. You can use geospatial tools to aggregate, cluster, partition, reduce, join, and index geospatial data. These tools improve query runtime performance, reduce stored data size, and visualize aggregated geospatial data. H3 is Uber’s Hexagonal Hierarchical Spatial Index. More information on how to chose the right algorithm can be found on the documentation for geospatial grid systems.


Visualizing "Kusto" on a map: “Kusto” on a map:



Calculates the H3 Cell token string value for a geographic location (doc). Example:


print h3cell = geo_point_to_h3cell(-74.04450446039874, 40.689250859314974, 6)




Calculates the geospatial coordinates that represent the center of an H3 Cell (doc). Example:


print centralpoint = geo_h3cell_to_central_point("862a1072fffffff")


“type”: “Point”,
“coordinates”: [-74.016008479792447, 40.7041679083504]



Geospatial cluster to polygon

This is something we wanted to add for some time. It’s the capability to calculate the polygon that represents the grid systems rectangular area.



Calculates the polygon that represents the geohash rectangular area (doc).

Geohash to polygon: to polygon:



Calculates the polygon that represents the S2 Cell rectangular area (doc).

S2 to polygon: to polygon:



Calculates the polygon that represents the H3 Cell rectangular area (doc).

H3 to polygon: to polygon:

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.