v.22.5New Feature
Adds h3Line, h3Distance, and h3HexRing Functions
Addsh3Line,h3Distanceandh3HexRingfunctions. #37030 (Bharat Nallan).
Why it matters
These functions extend ClickHouse's support for spatial data by enabling efficient computations and queries using H3 indexes.h3Line allows generating a line of hexagons between two points, h3Distance calculates the distance between H3 indexes, and h3HexRing creates a ring of hexagons at a specified distance. This improves the ability to perform precise spatial queries, analysis, and modeling over geographic data.How to use it
Use the new functions directly in SQL queries by passing valid H3 indexes and parameters. For example:SELECT h3Line(h3Index1, h3Index2);
SELECT h3Distance(h3Index1, h3Index2);
SELECT h3HexRing(h3Index, radius);Make sure your data includes H3 index columns or convert latitude/longitude to H3 indexes before using these functions.