Skip to content

Instantly share code, notes, and snippets.

@cosh
Last active October 15, 2022 06:18
Show Gist options
  • Save cosh/30626d87fc7e585365523fdb460d6195 to your computer and use it in GitHub Desktop.
Save cosh/30626d87fc7e585365523fdb460d6195 to your computer and use it in GitHub Desktop.
datatable(lng:real, lat:real)
[
-73.956683, 40.807907,
-73.916869, 40.818314,
-73.989148, 40.743273,
]
| project h3_hash = geo_point_to_h3cell(lng, lat, 6)
| project h3_hash_polygon = geo_h3cell_to_polygon(h3_hash)
| summarize h3_hash_polygon_lst = make_list(h3_hash_polygon)
| project pack(
"type", "Feature",
"geometry", pack("type", "GeometryCollection", "geometries", h3_hash_polygon_lst),
"properties", pack("name", "H3 polygons collection"))
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment