title_wip

Returns the resolution of the [H3](#h3-index) index.

**Syntax**

```
h3GetResolution(index)
```

**Parameter**

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

**Returned value**

- Index resolution. Range: `[0, 15]`. [UInt8](/docs/sql-reference/data-types/int-uint).

**Example**

Query:

```
SELECT h3GetResolution(617420388352917503) AS res;
```

Result:

```
┌─res─┐
│   9 │
└─────┘
```

## h3IsResClassIII[​](#h3isresclassiii "Direct link to h3IsResClassIII")

Returns whether [H3](#h3-index) index has a resolution with Class III orientation.

**Syntax**

```
h3IsResClassIII(index)
```

**Parameter**

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

**Returned value**

- `1` — Index has a resolution with Class III orientation. [UInt8](/docs/sql-reference/data-types/int-uint).
- `0` — Index doesn't have a resolution with Class III orientation. [UInt8](/docs/sql-reference/data-types/int-uint).

**Example**

Query:

```
SELECT h3IsResClassIII(617420388352917503) AS res;
```

Result:

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

## h3IsPentagon[​](#h3ispentagon "Direct link to h3IsPentagon")

Returns whether this [H3](#h3-index) index represents a pentagonal cell.

**Syntax**

```
h3IsPentagon(index)
```

**Parameter**

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

**Returned value**

- `1` — Index represents a pentagonal cell. [UInt8](/docs/sql-reference/data-types/int-uint).
- `0` — Index doesn't represent a pentagonal cell. [UInt8](/docs/sql-reference/data-types/int-uint).

**Example**

Query:

```
SELECT h3IsPentagon(644721767722457330) AS pentagon;
```

Result:

```
┌─pentagon─┐
│        0 │
└──────────┘
```

## h3GetFaces[​](#h3getfaces "Direct link to h3GetFaces")

Returns icosahedron faces intersected by a given [H3](#h3-index) index.

**Syntax**

```
h3GetFaces(index)
```

**Parameter**

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

**Returned values**

- Array containing icosahedron faces intersected by a given H3 index. [Array](/docs/sql-reference/data-types/array)([UInt64](/docs/sql-reference/data-types/int-uint)).

**Example**

Query:

```
SELECT h3GetFaces(599686042433355775) AS faces;
```

Result:

```
┌─faces─┐
│ [7]   │
└───────┘
```

## h3CellAreaM2[​](#h3cellaream2 "Direct link to h3CellAreaM2")

Returns the exact area of a specific cell in square meters corresponding to the given input H3 index.

**Syntax**

```
h3CellAreaM2(index)
```

**Parameter**

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

**Returned value**

- Cell area in square meters. [Float64](/docs/sql-reference/data-types/float).

**Example**

Query:

```
SELECT h3CellAreaM2(579205133326352383) AS area;
```

Result:

```
┌───────────────area─┐
│ 4106166334463.9233 │
└────────────────────┘
```

## h3CellAreaRads2[​](#h3cellarearads2 "Direct link to h3CellAreaRads2")

Returns the exact area of a specific cell in square radians corresponding to the given input H3 index.

**Syntax**

```
h3CellAreaRads2(index)
```

**Parameter**

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

**Returned value**

- Cell area in square radians. [Float64](/docs/sql-reference/data-types/float).

**Example**

Query:

```
SELECT h3CellAreaRads2(579205133326352383) AS area;
```

Result:

```
┌────────────────area─┐
│ 0.10116268528089567 │
└─────────────────────┘
```

## h3ToCenterChild[​](#h3tocenterchild "Direct link to h3ToCenterChild")

Returns the center child (finer) [H3](#h3-index) index contained by given [H3](#h3-index) at the given resolution.

**Syntax**

```
h3ToCenterChild(index, resolution)
```

**Parameter**

- `index` — Hexagon index number. [UInt64](/docs/sql-reference/data-types/int-uint).
- `resolution` — Index resolution. Range: `[0, 15]`. [UInt8](/docs/sql-reference/data-types/int-uint).

**Returned values**

- [H3](#h3-index) index of the center child contained by given [H3](#h3-index) at the given resolution. [UInt64](/docs/sql-reference/data-types/int-uint).

**Example**

Query:

```
SELECT h3ToCenterChild(577023702256844799,1) AS centerToChild;
```

Result:

```
┌──────centerToChild─┐
│ 581496515558637567 │
└────────────────────┘
```

## h3ExactEdgeLengthM[​](#h3exactedgelengthm "Direct link to h3ExactEdgeLengthM")

Returns the exact edge length of the unidirectional edge represented by the input h3 index in meters.

**Syntax**

```
h3ExactEdgeLengthM(index)
```

**Parameter**

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

**Returned value**

- Exact edge length in meters. [Float64](/docs/sql-reference/data-types/float).

**Example**

Query:

```
SELECT h3ExactEdgeLengthM(1310277011704381439) AS exactEdgeLengthM;;
```

Result:

```
┌───exactEdgeLengthM─┐
│ 195449.63163407316 │
└────────────────────┘
```

## h3ExactEdgeLengthKm[​](#h3exactedgelengthkm "Direct link to h3ExactEdgeLengthKm")

Returns the exact edge length of the unidirectional edge represented by the input h3 index in kilometers.

**Syntax**

```
h3ExactEdgeLengthKm(index)
```

**Parameter**

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

**Returned value**

- Exact edge length in kilometers. [Float64](/docs/sql-reference/data-types/float).

**Example**

Query:

```
SELECT h3ExactEdgeLengthKm(1310277011704381439) AS exactEdgeLengthKm;;
```

Result:

```
┌──exactEdgeLengthKm─┐
│ 195.44963163407317 │
└────────────────────┘
```

## h3ExactEdgeLengthRads[​](#h3exactedgelengthrads "Direct link to h3ExactEdgeLengthRads")

Returns the exact edge length of the unidirectional edge represented by the input h3 index in radians.

**Syntax**

```
h3ExactEdgeLengthRads(index)
```

**Parameter**

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

**Returned value**

- Exact edge length in radians. [Float64](/docs/sql-reference/data-types/float).

**Example**

Query:

```
SELECT h3ExactEdgeLengthRads(1310277011704381439) AS exactEdgeLengthRads;;
```

Result:

```
┌──exactEdgeLengthRads─┐
│ 0.030677980118976447 │
└──────────────────────┘
```

## h3NumHexagons[​](#h3numhexagons "Direct link to h3NumHexagons")

Returns the number of unique H3 indices at the given resolution.

**Syntax**

```
h3NumHexagons(resolution)
```

**Parameter**

- `resolution` — Index resolution. Range: `[0, 15]`. [UInt8](/docs/sql-reference/data-types/int-uint).

**Returned value**

- Number of H3 indices. [Int64](/docs/sql-reference/data-types/int-uint).

**Example**

Query:

```
SELECT h3NumHexagons(3) AS numHexagons;
```

Result:

```
┌─numHexagons─┐
│       41162 │
└─────────────┘
```

## h3PointDistM[​](#h3pointdistm "Direct link to h3PointDistM")

Returns the "great circle" or "haversine" distance between pairs of GeoCoord points (latitude/longitude) pairs in meters.

**Syntax**

```
h3PointDistM(lat1, lon1, lat2, lon2)
```

**Arguments**

- `lat1`, `lon1` — Latitude and Longitude of point1 in degrees. [Float64](/docs/sql-reference/data-types/float).
- `lat2`, `lon2` — Latitude and Longitude of point2 in degrees. [Float64](/docs/sql-reference/data-types/float).

**Returned values**

- Haversine or great circle distance in meters.[Float64](/docs/sql-reference/data-types/float).

**Example**

Query:

```
SELECT h3PointDistM(-10.0 ,0.0, 10.0, 0.0) AS h3PointDistM;
```

Result:

```
┌──────h3PointDistM─┐
│ 2223901.039504589 │
└───────────────────┘
```

## h3PointDistKm[​](#h3pointdistkm "Direct link to h3PointDistKm")

Returns the "great circle" or "haversine" distance between pairs of GeoCoord points (latitude/longitude) pairs in kilometers.

**Syntax**

```
h3PointDistKm(lat1, lon1, lat2, lon2)
```

**Arguments**

- `lat1`, `lon1` — Latitude and Longitude of point1 in degrees. [Float64](/docs/sql-reference/data-types/float).
- `lat2`, `lon2` — Latitude and Longitude of point2 in degrees. [Float64](/docs/sql-reference/data-types/float).

**Returned values**

- Haversine or great circle distance in kilometers. [Float64](/docs/sql-reference/data-types/float).

**Example**

Query: