Skip to main content

GeoToH3

Returns H3 point index (lon, lat) with specified resolution.

Syntax

geo_to_h3(lon, lat, resolution)

Arguments

ArgumentsDescription
lonLongitude. Type: Float64
lonLatitude. Type: Float64
resolutionIndex resolution. Range: [0, 15]. Type: UInt8

Return Type

  • Hexagon index number
  • 0 in case of error.

Type: UInt64

Examples

SELECT geo_to_h3(37.79506683, 55.71290588, 15) AS h3Index;
+-------------------------------+
| h3Index |
+-------------------------------+
| 644325524701193974 |
+-------------------------------+