Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to choose the suitable h3 resolutions when use polyfill?

Tags:

c

geospatial

h3

The H3 library offers hexagon grids at many resolutions - how should I choose the suitable h3 resolutions when using polyfill?

like image 259
nrabinowitz Avatar asked Jun 06 '18 16:06

nrabinowitz


1 Answers

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.

like image 92
nrabinowitz Avatar answered Oct 27 '22 01:10

nrabinowitz