6

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

nrabinowitz
  • 55,314
  • 10
  • 149
  • 165

1 Answers1

7

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.

nrabinowitz
  • 55,314
  • 10
  • 149
  • 165
  • any idea what resolution is used at Uber? – alexsmn Aug 13 '19 at 07:34
  • 1
    Different use cases require different resolutions, so different teams and systems choose resolutions that work for them. Res 9 is probably the most common at Uber - that’s about the size of 1-2 city blocks. – nrabinowitz Aug 13 '19 at 13:57
  • @nrabinowitz given that edge lengths are averages, what’s their plus/minus? – trndjc Mar 07 '20 at 03:33
  • See this answer: https://gis.stackexchange.com/a/353120/4078 - I haven’t calculated the edge lengths, but I think it’s fair to assume the largest and smallest cells have the min/max edge length. – nrabinowitz Mar 07 '20 at 03:49
  • Here is the updated link to the resolution table: https://h3geo.org/docs/core-library/restable – John Stud Dec 15 '20 at 18:09