Adaptive H3 grid #737
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is definitely possible with H3, though H3 doesn't support it directly. H3 has a hierarchical index structure that can be iteratively subdivided to get an adaptive grid like the one in your image. Here's an example notebook to demonstrate: https://observablehq.com/@nrabinowitz/h3-adaptive-grid There are various ways you can construct the grid. The one I use here assigns each point to a res 15 cell, then walks up the hierarchy until it finds a parent cell with other points in it. If the number of points in that parent cell is now beyond the max point threshold, it subdivides the parent and redistributes the points. Note that, because H3 cells do not perfectly contain their children, there are a few discrepancies when using H3 instead of S2:
Depending on your use case, these issues may or may not be blockers. |
Beta Was this translation helpful? Give feedback.
-
That's amazing! Thank you so much! |
Beta Was this translation helpful? Give feedback.
This is definitely possible with H3, though H3 doesn't support it directly. H3 has a hierarchical index structure that can be iteratively subdivided to get an adaptive grid like the one in your image. Here's an example notebook to demonstrate: https://observablehq.com/@nrabinowitz/h3-adaptive-grid
There are various ways you can construct the grid. The one I use here assigns each point to a res 15 cell, then walks up the hierarchy until it finds a parent cell with other points in it. If the number of points in that parent cell is now beyond the max point threshold, it subdivides the parent and redistributes the points.
Note that, because H3 cells do not perfectly contain their children, th…