v.22.2New Feature

Add h3ToCenterChild and new miscellaneous h3 functions

Add h3ToCenterChild function. #33313 (Bharat Nallan). Add new h3 miscellaneous functions: edgeLengthKm,exactEdgeLengthKm,exactEdgeLengthM,exactEdgeLengthRads,numHexagons. #33621 (Bharat Nallan).
Added new H3 geospatial functions including h3ToCenterChild, edgeLengthKm, exactEdgeLengthKm, exactEdgeLengthM, exactEdgeLengthRads, and numHexagons to enhance spatial data processing capabilities.

Why it matters

These functions extend ClickHouse's support for H3 geospatial indexing by providing utilities to compute distances on hexagonal cells, retrieve hierarchical child cells, and count hexagons within a range. This enables more precise and efficient geospatial analysis, improving the handling of hexagonal spatial data structures.

How to use it

Users can invoke the new functions directly in their SQL queries, for example, using h3ToCenterChild(h3_index, resolution) to get a child hexagon at a specified resolution or edgeLengthKm(resolution) to get approximate edge lengths. Simply include these functions where H3 computations are needed in your queries.