title_wip

**Example**

Query:

```
 SELECT h3UnidirectionalEdgeIsValid(1248204388774707199) AS validOrNot;
```

Result:

```
┌─validOrNot─┐
│          1 │
└────────────┘
```

## h3GetOriginIndexFromUnidirectionalEdge[​](#h3getoriginindexfromunidirectionaledge "Direct link to h3GetOriginIndexFromUnidirectionalEdge")

Returns the origin hexagon index from the unidirectional edge H3Index.

**Syntax**

```
h3GetOriginIndexFromUnidirectionalEdge(edge)
```

**Parameter**

- `edge` — Hexagon index number that represents a unidirectional edge. [UInt64](/docs/sql-reference/data-types/int-uint).

**Returned value**

- Origin Hexagon Index number. [UInt64](/docs/sql-reference/data-types/int-uint).

**Example**

Query:

```
 SELECT h3GetOriginIndexFromUnidirectionalEdge(1248204388774707197) AS origin;
```

Result:

```
┌─────────────origin─┐
│ 599686042433355773 │
└────────────────────┘
```

## h3GetDestinationIndexFromUnidirectionalEdge[​](#h3getdestinationindexfromunidirectionaledge "Direct link to h3GetDestinationIndexFromUnidirectionalEdge")

Returns the destination hexagon index from the unidirectional edge H3Index.

**Syntax**

```
h3GetDestinationIndexFromUnidirectionalEdge(edge)
```

**Parameter**

- `edge` — Hexagon index number that represents a unidirectional edge. [UInt64](/docs/sql-reference/data-types/int-uint).

**Returned value**

- Destination Hexagon Index number. [UInt64](/docs/sql-reference/data-types/int-uint).

**Example**

Query:

```
 SELECT h3GetDestinationIndexFromUnidirectionalEdge(1248204388774707197) AS destination;
```

Result:

```
┌────────destination─┐
│ 599686043507097597 │
└────────────────────┘
```

## h3GetIndexesFromUnidirectionalEdge[​](#h3getindexesfromunidirectionaledge "Direct link to h3GetIndexesFromUnidirectionalEdge")

Returns the origin and destination hexagon indexes from the given unidirectional edge H3Index.

**Syntax**

```
h3GetIndexesFromUnidirectionalEdge(edge)
```

**Parameter**

- `edge` — Hexagon index number that represents a unidirectional edge. [UInt64](/docs/sql-reference/data-types/int-uint).

**Returned value**

A tuple consisting of two values `tuple(origin,destination)`:

- `origin` — Origin Hexagon index number. [UInt64](/docs/sql-reference/data-types/int-uint).
- `destination` — Destination Hexagon index number. [UInt64](/docs/sql-reference/data-types/int-uint).

Returns `(0,0)` if the provided input is not valid.

**Example**

Query:

```
 SELECT h3GetIndexesFromUnidirectionalEdge(1248204388774707199) AS indexes;
```

Result:

```
┌─indexes─────────────────────────────────┐
│ (599686042433355775,599686043507097599) │
└─────────────────────────────────────────┘
```

## h3GetUnidirectionalEdgesFromHexagon[​](#h3getunidirectionaledgesfromhexagon "Direct link to h3GetUnidirectionalEdgesFromHexagon")

Provides all of the unidirectional edges from the provided H3Index.

**Syntax**

```
h3GetUnidirectionalEdgesFromHexagon(index)
```

**Parameter**

- `index` — Hexagon index number that represents a unidirectional edge. [UInt64](/docs/sql-reference/data-types/int-uint).

**Returned value**

Array of h3 indexes representing each unidirectional edge. [Array](/docs/sql-reference/data-types/array)([UInt64](/docs/sql-reference/data-types/int-uint)).

**Example**

Query:

```
 SELECT h3GetUnidirectionalEdgesFromHexagon(1248204388774707199) AS edges;
```

Result:

```
┌─edges─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [1248204388774707199,1320261982812635135,1392319576850563071,1464377170888491007,1536434764926418943,1608492358964346879] │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```

## h3GetUnidirectionalEdgeBoundary[​](#h3getunidirectionaledgeboundary "Direct link to h3GetUnidirectionalEdgeBoundary")

Returns the coordinates defining the unidirectional edge.

**Syntax**

```
h3GetUnidirectionalEdgeBoundary(index)
```

**Parameter**

- `index` — Hexagon index number that represents a unidirectional edge. [UInt64](/docs/sql-reference/data-types/int-uint).

**Returned value**

- Array of pairs '(lon, lat)'. [Array](/docs/sql-reference/data-types/array)([Float64](/docs/sql-reference/data-types/float), [Float64](/docs/sql-reference/data-types/float)).

**Example**

Query:

```
 SELECT h3GetUnidirectionalEdgeBoundary(1248204388774707199) AS boundary;
```

Result:

```
┌─boundary────────────────────────────────────────────────────────────────────────┐
│ [(37.42012867767779,-122.03773496427027),(37.33755608435299,-122.090428929044)] │
└─────────────────────────────────────────────────────────────────────────────────┘
```

- [H3 Index](#h3-index)- [h3IsValid](#h3isvalid)- [h3GetResolution](#h3getresolution)- [h3EdgeAngle](#h3edgeangle)- [h3EdgeLengthM](#h3edgelengthm)- [h3EdgeLengthKm](#h3edgelengthkm)- [geoToH3](#geotoh3)- [h3ToGeo](#h3togeo)- [h3ToGeoBoundary](#h3togeoboundary)- [h3kRing](#h3kring)- [h3PolygonToCells](#h3polygontocells)- [h3GetBaseCell](#h3getbasecell)- [h3HexAreaM2](#h3hexaream2)- [h3HexAreaKm2](#h3hexareakm2)- [h3IndexesAreNeighbors](#h3indexesareneighbors)- [h3ToChildren](#h3tochildren)- [h3ToParent](#h3toparent)- [h3ToString](#h3tostring)- [stringToH3](#stringtoh3)- [h3GetResolution](#h3getresolution-1)- [h3IsResClassIII](#h3isresclassiii)- [h3IsPentagon](#h3ispentagon)- [h3GetFaces](#h3getfaces)- [h3CellAreaM2](#h3cellaream2)- [h3CellAreaRads2](#h3cellarearads2)- [h3ToCenterChild](#h3tocenterchild)- [h3ExactEdgeLengthM](#h3exactedgelengthm)- [h3ExactEdgeLengthKm](#h3exactedgelengthkm)- [h3ExactEdgeLengthRads](#h3exactedgelengthrads)- [h3NumHexagons](#h3numhexagons)- [h3PointDistM](#h3pointdistm)- [h3PointDistKm](#h3pointdistkm)- [h3PointDistRads](#h3pointdistrads)- [h3GetRes0Indexes](#h3getres0indexes)- [h3GetPentagonIndexes](#h3getpentagonindexes)- [h3Line](#h3line)- [h3Distance](#h3distance)- [h3HexRing](#h3hexring)- [h3GetUnidirectionalEdge](#h3getunidirectionaledge)- [h3UnidirectionalEdgeIsValid](#h3unidirectionaledgeisvalid)- [h3GetOriginIndexFromUnidirectionalEdge](#h3getoriginindexfromunidirectionaledge)- [h3GetDestinationIndexFromUnidirectionalEdge](#h3getdestinationindexfromunidirectionaledge)- [h3GetIndexesFromUnidirectionalEdge](#h3getindexesfromunidirectionaledge)- [h3GetUnidirectionalEdgesFromHexagon](#h3getunidirectionaledgesfromhexagon)- [h3GetUnidirectionalEdgeBoundary](#h3getunidirectionaledgeboundary)

Was this page helpful?