v.20.3New Feature

Implement Additional H3 API Functions in ClickHouse

Implement more functions of the H3 API: h3GetBaseCell, h3HexAreaM2, h3IndexesAreNeighbors, h3ToChildren, h3ToString and stringToH3 #8938 (Nico Mandery)
Added support for additional functions from the H3 geospatial indexing library, including h3GetBaseCell, h3HexAreaM2, h3IndexesAreNeighbors, h3ToChildren, h3ToString, and stringToH3.

Why it matters

These new functions enhance ClickHouse's geospatial capabilities by allowing users to perform more detailed spatial analysis using H3 hexagonal hierarchical indexing. This helps solve problems related to spatial relationships, area calculations, index conversions, and hierarchical queries on geospatial data.

How to use it

Users can utilize these new H3 functions directly in SQL queries after including the H3 library support in their ClickHouse installation. For example, you can convert H3 indexes to strings with h3ToString(h3_index), check neighbor relations with h3IndexesAreNeighbors(h3_index1, h3_index2), or get children of an H3 cell with h3ToChildren(h3_index, resolution).