Skip to content

timmc/geohash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geohash

A Clojure library for computing geohashes.

You are responsible for acquiring DJIA data, but this library will at least tell you which date to acquire it for.

  • Fully 30W-compliant
  • Negative-zero compliant
  • Avoids the scientific notation bug

Usage

Add as a Leiningen dependency:

[org.timmc/geohash "1.0.0"]

Compute a geohash:

(require '[org.timmc.geohash :as gh])
;;= nil

(gh/dow-date 42.37 -0.5 (org.joda.time.LocalDate. 2012 3 5))
;;= #<LocalDate 2012-03-04> ;; different from input due to 30W rule

(slurp (java.net.URI. "http://geo.crox.net/djia/2012/03/04"))
;;= "12980.75"

(gh/geohash 42.37 -0.5 (org.joda.time.LocalDate. 2012 3 5) "12980.75")
;;= [42.71583060829183 -0.17616573365392707]

See the org.timmc.geohash namespace documentation for more information:

(-> (the-ns 'org.timmc.geohash) meta :doc println)

Building

Built with Leiningen 2.x, although 1.x should work as well.

License

Copyright © 2013 Tim McCormack

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

About

Clojure lib for geohashes

Resources

License

Stars

Watchers

Forks

Packages

No packages published