Skip to content

Adaptive H3 grid #737

Answered by nrabinowitz
ysig asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ysig
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants