Hi,
I have a Postgis table describing special districts, ara.lpc_hid.
Each of them has a geom column attached.
I want to insert the H3 hexagons inside each of these districts into another table, h_3.tst.
So, I followed your conversation with @rbrtmrtn and came up with the following procedure, that worked (I apply it here to a district called Fieldston):
TRUNCATE h_3.tst;
WITH cells AS (
SELECT h3_polygon_to_cells(st_setsrid(st_extent(H.geom),4326),11) AS hexref FROM ara.lpc_hid AS H WHERE NOT st_isempty(H.geom) AND H.nam_spl='Fieldston'
)
INSERT INTO h_3.tst (ref,res,geom) SELECT hexref,11 AS res,h3_cell_to_boundary_geometry(hexref) FROM cells;
However, here is the result, as visualized in QGis -- in red the district perimeter, in blue the resulting H3 hexagons:
As you can see, the hexagons at resolution 11 are "bleeding" a lot out of the perimeter.
Hi, I have a Postgis table describing special districts,
ara.lpc_hid
. Each of them has ageom
column attached. I want to insert the H3 hexagons inside each of these districts into another table,h_3.tst
.So, I followed your conversation with @rbrtmrtn and came up with the following procedure, that worked (I apply it here to a district called
Fieldston
):However, here is the result, as visualized in QGis -- in red the district perimeter, in blue the resulting H3 hexagons:
As you can see, the hexagons at resolution 11 are "bleeding" a lot out of the perimeter.
What am I missing here? S.