Live data from Hacker News

Geohash: text representation allows you to sort locations by proximity

en.wikipedia.org

1–9 of 9 posts

Re: Geohash: text representation allows you to sort locations by proximity

#3
There is another free library to do that, among other things, by Google. It's not well known, but it was used all over the place internally (at least by the geo team).

https://code.google.com/p/s2-geometry-library/

The key difference with geohash is that it uses a Hilbert curve instead of a z-curve and it projects the world in a cube instead of using directly cartesian coordinates.

Re: Geohash: text representation allows you to sort locations by proximity

#5
If you like this stuff, have a look at Healpix: http://healpix.sourceforge.net/ It splits sphere into pixels each with separate number. It is sort of fast hashing for spherical purposes in astronomy. It does not require trigonometric operations and is very fast.

Re: Geohash: text representation allows you to sort locations by proximity

#9
post #8
post #6

Ruby implementation: https://github.com/davetroy/geohash

Why would you link this? It wraps around a java jar file. I can't study the code to see how it's implemented.

I believe by default it uses the C implementation which you can read here: https://github.com/davetroy/geohash/blob/master/ext/geohash_...