跳转到内容

返回给定位置所在六边形单元的 H3 索引。返回 0 表示发生了错误。

func.geo_to_h3(lon, lat, res)
func.geo_to_h3(37.79506683, 55.71290588, 15)
┌──────────────────────────────────────────────┐
│ func.geo_to_h3(37.79506683, 55.71290588, 15) │
├──────────────────────────────────────────────┤
│ 644325524701193974 │
└──────────────────────────────────────────────┘
GEO_TO_H3(lon, lat, res)
SELECT GEO_TO_H3(37.79506683, 55.71290588, 15);
┌─────────────────────────────────────────┐
│ geo_to_h3(37.79506683, 55.71290588, 15) │
├─────────────────────────────────────────┤
│ 644325524701193974 │
└─────────────────────────────────────────┘