1. Ning Sun
  2. clojure-geohash


clojure-geohash / README.md

Ning Sun 75c180a 

Ning Sun 3ed51c9 
Ning Sun 75c180a 

# geohash

[Geohash](http://en.wikipedia.org/wiki/Geohash "geohash") library for clojure.

## Usage

Include geohash with leiningen:

    (defproject your-project "1.0.0-SNAPSHOT"
        :dependencies [[org.clojars.sunng/geohash "1.0.1"]])
Encode coordinate into geohash:

    (use [geohash.core])
    (encode 37.8324 112.5584 9)
Decode geohash into coordinate:

    (decode "ww8p1r4t8")
    {:lat 37.83238649368286,
     :lon 112.55838632583618,
     :lat-err 2.1457672119140625E-5,
     :lon-err 2.1457672119140625E-5}
Decode geohash into bound box:

    (decode-bbox "ww8p1r4t8")
    {:minlon 112.55836486816406,
     :maxlon 112.5584077835083,
     :minlat 37.83236503601074,
     :maxlat 37.83240795135498}       

## License

Copyright (C) 2011 Sun Ning <classicning@gmail.com>

Distributed under the Eclipse Public License, the same as Clojure.