v.25.11New Feature

Add h3PolygonToCells

Add h3PolygonToCells function which can fill geometry with h3 hexagons. Resolves #33991. #66262 (Zacharias Knudsen).
Introduces the h3PolygonToCells function to fill a given geometry with H3 hexagonal cells, enabling spatial indexing and analysis using the H3 geospatial indexing system.

Why it matters

This feature addresses the need to represent polygonal geometries as collections of H3 hexagons, which are useful for spatial analysis and efficient geospatial queries. It allows users to convert complex shapes into a standardized hexagonal grid format, improving spatial data processing and visualization.

How to use it

Use the h3PolygonToCells function by passing a polygon geometry and resolution as arguments. The function returns an array of H3 hexagon cell indexes that cover the polygon area. Example usage:

sql<br>SELECT h3PolygonToCells(polygon_column, resolution) FROM table<br>