Using PostgreSQL 14.5, PostGIS 3.3 and OSM data, with Uber h3 extension for PostGIS I am trying to get all hexagons within a certain boundry of polygons.
This SQL query:
SELECT h3_polygon_to_cells(polygon(poly.way), array[]::polygon[], 8)
FROM planet_osm_polygon AS poly
WHERE poly.admin_level = '4' LIMIT 5;
is timing out, even though there are only 6 results in total for the WHERE clause:
SELECT count(*) FROM planet_osm_polygon WHERE admin_level = '4'
--> 6
Since I am a bit rusty with SQL and new to PostgreSQL, I suspect I have a syntax error in function invocation of h3_polygon_to_cells
.