Skip to content

Instantly share code, notes, and snippets.

@cosh
Created June 14, 2021 20:51
Show Gist options
  • Save cosh/e9b5d65b813b4fe4fb7b8d4bd6386287 to your computer and use it in GitHub Desktop.
Save cosh/e9b5d65b813b4fe4fb7b8d4bd6386287 to your computer and use it in GitHub Desktop.
// Geohash GeoJSON collection
datatable(lng:real, lat:real)
[
-73.975212, 40.789608,
-73.916869, 40.818314,
-73.989148, 40.743273,
]
| project geohash = geo_point_to_geohash(lng, lat, 5)
| project geohash_polygon = geo_geohash_to_polygon(geohash)
| summarize geohash_polygon_lst = make_list(geohash_polygon)
| project pack(
"type", "Feature",
"geometry", pack("type", "GeometryCollection", "geometries", geohash_polygon_lst),
"properties", pack("name", "Geohash 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