
Loch Aineort
by Greg Morss
I was intrigued by the algorithm used to create “geohashes” and so I wrote this PHP class to encode and decode them.
It comes with a test harness and passes enough tests to reasonably sure it is compatible with the reference implementation at geohash.org. That said, I’d regard it as beta - I’m sure the code could be heavily optimised, but might serve as base for translation into other languages.
Download geohash.tar.gz (15Kb)