Difference between revisions of "Implementations/Libraries"
imported>Relet |
imported>Relet (→Javascript) |
||
Line 2: | Line 2: | ||
== Erlang == | == Erlang == | ||
== Javascript == | == Javascript == | ||
+ | === Semi-manual offline calculator === | ||
+ | {{30w compliant|yes=1}} | ||
+ | If you're going to be away from internet access, you'll need to compute the hash locally: | ||
+ | * Download and extract this: http://lab.brainonfire.net/drop/geohash-offline.zip | ||
+ | * Working example: http://lab.brainonfire.net/geohash-offline/calc.html | ||
+ | |||
+ | ==== Notes ==== | ||
+ | * All you need is a Javascript-enabled browser. Tested in Firefox so far. | ||
+ | * You will have to ''somehow'' acquire the [[Dow]]'s opening value for the appropriate date; there may be a service to do this. | ||
+ | ** Remember, if you're east of [[30W]], you should use the '''previous day's''' opening price, even if a new one becomes available later in the day. | ||
+ | * The date is filled in automatically using the current timestamp. | ||
+ | * You'll have to combine the computed fractional coordinates with your graticule coordinates yourself. | ||
+ | * I grabbed MD5 and base conversion code from random internet sites. | ||
+ | |||
== k4 == | == k4 == | ||
== PERL == | == PERL == |
Revision as of 07:44, 10 April 2012
Contents
D
Erlang
Javascript
Semi-manual offline calculator
This implementation IS FULLY 30W-compliant. |
If you're going to be away from internet access, you'll need to compute the hash locally:
- Download and extract this: http://lab.brainonfire.net/drop/geohash-offline.zip
- Working example: http://lab.brainonfire.net/geohash-offline/calc.html
Notes
- All you need is a Javascript-enabled browser. Tested in Firefox so far.
- You will have to somehow acquire the Dow's opening value for the appropriate date; there may be a service to do this.
- Remember, if you're east of 30W, you should use the previous day's opening price, even if a new one becomes available later in the day.
- The date is filled in automatically using the current timestamp.
- You'll have to combine the computed fractional coordinates with your graticule coordinates yourself.
- I grabbed MD5 and base conversion code from random internet sites.
k4
PERL
Geo::Hashing on CPAN
This implementation IS FULLY 30W-compliant. |
Reusable code library that can be used from any perl program:
Python
Code snippets
This implementation IS FULLY 30W-compliant. |
Various code snippets can be found at Implementations/Libraries/Python.
Python package xkcd.geohash
This implementation IS NOT 30W-compliant. |
There is Python package xkcd.geohash
which is independent of the interactive coordinate calculator (but uses Google Finance as well).
Python 3 standard library
In Python 3.1 and above, an implementation of the geohashing algorithm is included in the antigravity module. Unfortunately importing the module will open a web browser.
>>>import antigravity (opens the xkcd comic) >>>antigravity.geohash(34,-118,b'2012-04-09-13057.57') 34.386614 -118.231675
RESTful implementation with Atom feed
This implementation IS FULLY 30W-compliant. |
The source for the Atom feed is available through anonymous svn here: https://staticfree.info/svn/ghfeed/
This implementation uses web.py
to give simple, clean URLs. To contribute to it, please contact xxv and he can set you up with commit access.
Shell Script
This implementation IS FULLY 30W-compliant. |