Hexagons are everywhere, from honeycombs to fly eyes to soap bubbles to the popular German board game, Settlers of Catan. And for good reason: hexagons are the most space-efficient regular polygon that can tile a plane. Or in bee terms, less wax — more honey.

But what do hexagons have to do with Helium?

At Helium, we’re building the world’s first decentralized machine network — a physical network of coverage for devices provided by gateways hosted throughout the world. Consequently, location is a core tenet of our network.

In addition to the need to represent a position in the world, our network also has some unique geospatial requirements: we need to encode precision and proximity. Precision (i.e. are we talking about a single point in space, or a larger, less precise area?) let’s us approximate range of coverage and anonymize gateway locations to some degree. Proximity allows us to reason which gateways are close to one another.

Uber’s H3: A Hexagonal Hierarchical Geospatial Indexing System

While there are plenty of coordinate systems out there, Uber’s H3 hexagonal grid system was a natural fit for our unique set of requirements.

Why do hexagons make for a good grid system? It turns out hexagons have some useful properties (as the bees among us already know). If you want to tile a plane with a regular polygon, you have just three options: equilateral triangles, squares, and hexagons. Of these three options, hexagons are the only shape which have the same distance to its neighbors. In comparison, squares have two different distances and triangles have three. This simple property vastly simplifies the math around calculating neighbor regions — a key function of our network.

Hexagonal grids are not without their weaknesses: for example squares subdivide perfectly from parent to children, whereas hexagons do not. This means there is a small degree of error when moving up or down in the hexagonal hierarchy. This tradeoff is acceptable in our network.