diff --git a/docs/en/sql-reference/functions/geo/h3.md b/docs/en/sql-reference/functions/geo/h3.md index cc34c916187..5a0d80dd267 100644 --- a/docs/en/sql-reference/functions/geo/h3.md +++ b/docs/en/sql-reference/functions/geo/h3.md @@ -1100,4 +1100,40 @@ Result: │ 1 │ └────────────┘ ``` + +## h3GetOriginIndexFromUnidirectionalEdge {#h3getoriginindexfromunidirectionaledge} + +Returns the origin hexagon index from the unidirectional edge H3Index. + +**Syntax** + +``` sql +h3GetOriginIndexFromUnidirectionalEdge(edge) +``` + +**Parameter** + +- `edge` — Hexagon index number that represents a unidirectional edge. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned value** + +- Origin Hexagon Index number. + +Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql + SELECT h3GetOriginIndexFromUnidirectionalEdge(1248204388774707197) as origin; +``` + +Result: + +``` text +┌─────────────origin─┐ +│ 599686042433355773 │ +└────────────────────┘ +``` [Original article](https://clickhouse.com/docs/en/sql-reference/functions/geo/h3)