HN Hall of Fame Weekly email

Damn Cool Algorithms: Quadtrees and Hilbert Curves

blog.notdot.net Books & learning Tutorials & guides Computer science Candidate
Screenshot of blog.notdot.net captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 3 calendar years, with breakout response in 2 of them.

submissions
3
submitters
3
observed span
2009–2018
peak thread · 14 comments
137 pts
latest 20+ return · 2012-01-18
137 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

This might be obvious to many, but spatial indexes are good for more than just "show me the restaurants within five miles of me". It's a good technique to know for efficiently searching any two columns simultaneously. If you have, for example, a database of people, their hometown, and their favorite color, and you want to know all people from Chicago that like green, a spacial index over color and hometown will be vastly more efficient than a "regular" single-column…

Addenda & thoughts since I do a lot of work along similar lines: It's probably not a bad idea to have the option of a spatial index at the leaves of a geohash, as the geohash is necessarily of limited precision and will behave badly if someone inserts 100k points all within a 1x1 foot area. ;) (This is equivalent, roughly, to a plain quadtree only with the first N levels of the tree pre-calculated and cached locally.) I'm guessing…

crux_·107-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
247

reference only — not used in Hall rules or ranking

Total comments
24

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2009-11-09Damn Cool Algorithms: Spatial indexing with Quadtrees and Hilbert CurvesFirst breakoutnickjohnson10710
2012-01-18Damn Cool Algorithms: Quadtrees and Hilbert CurvesBest thread · Latest 20+ point returnemson13714
2018-08-16Damn Cool Algorithms: Spatial Indexing with Quadtrees and Hilbert Curvesdpeck30