Hacker News new | ask | show | jobs
by isaachier 2860 days ago
Shameless plug: why not use H3 (https://github.com/uber/h3)?
1 comments

what does H3 gain over S2 in exchange for cells at different levels no longer matching up? do you think their use case justifies that change?
H3 has advantages in the analysis of the gathered data. Movement of users between cells is guaranteed to go through edges instead of points, so you can do flow analyses with electric current modeling.

A hex grid is the most efficient way to pack circles and is therefore the best "pixel" type to approximate radii, so simply choosing a hex size best matching the desired query radius can give you a very fast nearest-neighbor approximation.

And H3 retains all of S2's good features like hexagons following a curve (not the Hilbert curve, though) so hexagon IDs of similar value will more than likely be near each other, making range queries from a database still useful.