Update on geospatial functions

This post has been republished via RSS; it originally appeared at: Azure Data Explorer Blog articles.

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: https://gist.github.com/cosh/2c22c1ccf673f2af1dc44aa764887c4b#file-map-geojsonVisualizing "Kusto" on a map: https://gist.github.com/cosh/2c22c1ccf673f2af1dc44aa764887c4b#file-map-geojson



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: https://gist.github.com/cosh/e9b5d65b813b4fe4fb7b8d4bd6386287#file-map-geojsonGeohash to polygon: https://gist.github.com/cosh/e9b5d65b813b4fe4fb7b8d4bd6386287#file-map-geojson



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

S2 to polygon: https://gist.github.com/cosh/acbc84f82441f3d41a2b73e8b26d9ae9#file-map-geojsonS2 to polygon: https://gist.github.com/cosh/acbc84f82441f3d41a2b73e8b26d9ae9#file-map-geojson



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

H3 to polygon: https://gist.github.com/cosh/30626d87fc7e585365523fdb460d6195#file-map-geojsonH3 to polygon: https://gist.github.com/cosh/30626d87fc7e585365523fdb460d6195#file-map-geojson



REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.