By poudro - a day ago
Showing first level comment(s)
That's a super cool detail! I once implemented a 2D index using a Z-Order curve that directly translated lat/lon coordinates to a linear ordering. It works well enough because nobody really lives at the poles--the search regions with a single projection get really obtuse there. Projecting the earth onto a 6-sided die is a really elegant solution to that problem! Go go Google engineering!
digsmahler - 15 hours ago
Part 2 of Tinder post is still in my bookmarks to read, but already I am loving Zenly's in-depth analysis of their findings!
It seems that using Google's S2 library is pretty much standard for this problem, I'm curious if other companies are doing this too?
[1]https://tech.gotinder.com/geosharded-recommendations-part-1-...
kgraves - 15 hours ago
I mean, any Quad/Octree/N-dimensional equivalent can have its cells numbered by giving each quadrant/octant/each of the 2^N sub-cells a certain bit combination and then chaining those together as you descend the tree. The Hilbert curve version is just a special case of this with complicated rules for the "sub cell" <-> "bit sequence" mapping. If you were to use a Z curve, the resulting data format and querying algorithm would be exactly identical to the one in the article, just a lot less complicated in the (not presented) details of "where is this child" than the Hilbert version...
MauranKilom - 14 hours ago
dylrich - 15 hours ago
isaachier - 15 hours ago
speleo - 15 hours ago