Geohash PHP Class

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)

2 thoughts on “Geohash PHP Class

  1. Pingback: 2010/03/10に気になったこと | debeso

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>