-
Hello, again! I'm trying to get all hexagon IDs and geometries to cover a polygon at a given resolution. My query to get the IDs looks like: select
h3_polygon_to_cells(
st_setsrid(st_extent(geom), 4326),
8
) as id
from boundary and that's working great! Now I just need to get the geometry for each hexagon. I'm having some trouble finding the right function. I've been trying Is there anyone who might be able to give me a pointer on this? Thanks so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi again, Robert! If you wish to fetch one geometry per cell, I would use WITH cells AS (
SELECT
h3_polygon_to_cells(
st_setsrid(st_extent(geom), 4326),
8
) AS id
FROM boundary
) SELECT id, h3_cell_to_boundary_geometry(id) FROM cells; Cheers! |
Beta Was this translation helpful? Give feedback.
Hi again, Robert!
If you wish to fetch one geometry per cell, I would use
h3_polygon_to_cells
, for example:Cheers!