Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Uber's open source geospatial suite is simply amazing. A while back I used H3 to visualize snowfall in Colorado (powdamap.com) and the result came out way better than a grid based approach with the added of benefit of doing a better job representing a continuous variable.


How was it better? I'm having trouble understanding why this is better than a simple grid. Grids on the surface of a sphere certainly have problems at high latitudes if naively applied. But they are incredibly simple to use, and don't have H3's problems of edges that don't quite overlap.


Depends on your use case. Hex's have a lot of advantages when you are a transportation oriented company. All hexes are the same size and the distance between the center of any two adjacent hexes is always the same distance. https://h3geo.org/docs/highlights/aggregation

As an example of where this is useful, it makes it very easy to get a list of all hexes with distance less than X from a current location.

Here's a comparison they give to some of the other common geographical partitions https://h3geo.org/docs/comparisons/s2


Yes. This is why, btw, wargames have more or less standardized in hex grids: no sudden 20% increase of speed for units moving diagonally.


Hexagons are the bestagons; better than all the restagons.


You forgot the reference video!! :-) https://www.youtube.com/watch?v=thOifuHs6eY&t=5s


Don't you mean sqrt(2) increase in speed? (1.41+)


Yes, sorry, 1.4 (also consider that most wargames have rules where travelling on roads units can double speed...)


Solve the problem "find me the all restaurants within 1 mile of of my location" efficiently in a database with restaurants and their lat-long coordinates.

Brute force solution: iterate over all possible restaurants, compute their distance to your location, then return the list that meet the criteria.

Better solution: cut the world into 1-mile square grids, and assign each restaurant a grid square index. Search for all restaurants in your grid square, plus all adjacent grid squares to that (because you might be on the edge of your square), and filter out the ones that are more than 1 mile away. This is a pretty good solution, but you're searching a square area for a circle of restaurants. Any restaurants in the corners of the square are wasting your time -- you're never within 1 mile of the corner.

So, if you could search a circular area, you'd have no corners. Using tessellated hexagons means your search space is more circular, so it's more efficient.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: