GEO_TO_H3
Learn how to use the GEO_TO_H3 utility function in PlaidCloud Lakehouse. Returns the H3 index of the hexagon cell where the given location resides.
Returns the H3 index of the hexagon cell where the given location resides. Returning 0 means an error occurred.
Analyze Syntax
func.geo_to_h3(lon, lat, res)
Analyze Examples
func.geo_to_h3(37.79506683, 55.71290588, 15)
┌──────────────────────────────────────────────┐
│ func.geo_to_h3(37.79506683, 55.71290588, 15) │
├──────────────────────────────────────────────┤
│ 644325524701193974 │
└──────────────────────────────────────────────┘
SQL Syntax
GEO_TO_H3(lon, lat, res)
SQL Examples
SELECT GEO_TO_H3(37.79506683, 55.71290588, 15);
┌─────────────────────────────────────────┐
│ geo_to_h3(37.79506683, 55.71290588, 15) │
├─────────────────────────────────────────┤
│ 644325524701193974 │
└─────────────────────────────────────────┘