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.
geo_point_to_h3cell()
Calculates the H3 Cell token string value for a geographic location (doc). Example:
print h3cell = geo_point_to_h3cell(-74.04450446039874, 40.689250859314974, 6)
h3cell |
862a1072fffffff |
geo_h3cell_to_central_point()
Calculates the geospatial coordinates that represent the center of an H3 Cell (doc). Example:
print centralpoint = geo_h3cell_to_central_point("862a1072fffffff")
centralpoint |
{ "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.
geo_geohash_to_polygon()
Calculates the polygon that represents the geohash rectangular area (doc).
geo_s2cell_to_polygon()
Calculates the polygon that represents the S2 Cell rectangular area (doc).
geo_h3cell_to_polygon()
Calculates the polygon that represents the H3 Cell rectangular area (doc).