Hacker News new | ask | show | jobs
by IshKebab 3006 days ago
Converting coordinates to string-based hashes is quite weird. Why not just find which grid square they are in and used the flat index of it?
1 comments

Hmm, you don't have to convert the geohash to a (base-32) string - int64 may be just as fine.

Perhaps they can take advantage of the better locality of Z index compared to flat index, and/or they want to store higher precision and do lookups with varying precisions (grid sizes)?

We use geohash because it's really fast and we can control precision. We don't need to store any information about grid and we don't need to convert coordinates to spherical view.