Closed marklit closed 4 months ago
I think it's now possible to do that with the H3 C library, but it's not yet exposed in h3-py
IIUC.
Meanwhile you could try h3ronpy, with ContainmentMode=IntersectsBoundary
(or Cover
) it should do the trick.
Cf. example here.
If it's a one-shot thing, you could also use h3o-cli
:
h3o-cli geomToCells -r 3 -m intersects-boundary < US.geojson | h3o-cli cellToPolygon > H3-coverage.geojson
Thanks for that.
I want to generate H3s for the coastal areas as well as anything inland. With
h3.LatLngPoly
it only wants to generate hexagons that are entirely in land and miss areas like Miami for example. Any idea how I could do this?Here's the code that I have atm: