The H3 library offers hexagon grids at many resolutions - how should I choose the suitable h3 resolutions when using polyfill
?
You can see the resolution table in the docs, which provides the average area and edge length for hexagons at each resolution (area will vary slightly within a resolution). You can also use the hexArea
function to get this information dynamically.
At that point you can make your own determination about the balance between accuracy around the edges of the polygon you're trying to fill, and the amount of memory/processing required. Each finer resolution will result in approximately 7x hexagons compared to the resolution before.
Note that a hexagon at a given resolution does not exactly contain its children at the next finer resolution, so moving between resolutions introduces a margin of error around the edges. For this reason, if you need to share hexagon data between multiple systems, it's generally a good idea to pick one resolution appropriate to your use case and stick to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With