Difference between revisions of "Implementations/Libraries"

From Geohashing
imported>Relet
m (Semi-manual offline calculator)
m (Fixed header level error)
 
(16 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 
== D ==
 
== D ==
;Local email tool in D, for Linux
+
; Local email tool in D, for Linux  
 
{{30w compliant|yes=1}}
 
{{30w compliant|yes=1}}
Run this program once a day (for instance, per crontab) to get email notification whenever Google Maps indicates the daily target is nearer than a specified range. The first time around, run it from the commandline to configure. Configuration is stored in ~/.geohash/geohash.cfg. Use --help for info about commandline parameters. [http://paste.dprogramming.com/dpxcs3lx Source. ] [http://demented.no-ip.org/geohashd Linux 32-bit upx compressed binary. ]
+
Run this program once a day (for instance, per crontab) to get email notification whenever Google Maps indicates the daily target is nearer than a specified range. The first time around, run it from the commandline to configure. Configuration is stored in ~/.geohash/geohash.cfg. Use --help for info about commandline parameters. [http://paste.dprogramming.com/dpxcs3lx Source. ] [http://feephome.no-ip.org/~feep/geohashdd Linux 32-bit upx compressed binary]. - Ported it again to my own language. [https://gist.github.com/9101907 Source.] [http://feephome.no-ip.org/~feep/geohashd Linux 32-bit binary]
  
 
== Erlang ==
 
== Erlang ==
Line 8: Line 8:
  
 
[[Implementations/Libraries/Erlang]]
 
[[Implementations/Libraries/Erlang]]
 +
 +
== Clojure ==
 +
{{30w compliant|yes=1}}
 +
 +
A geohash and globalhash library in Clojure: https://github.com/timmc/geohash
 +
 +
Maintained by [[User:Phyzome|Phyzome]], who also runs an [https://github.com/timmc/hashflash email autoresponder] that uses this library.
  
 
== Java ==
 
== Java ==
Line 14: Line 21:
  
 
== Javascript ==
 
== Javascript ==
=== Semi-manual offline calculator ===
+
; Semi-manual offline calculator
 
{{30w compliant|yes=1}}
 
{{30w compliant|yes=1}}
 
If you're going to be away from internet access, you'll need to compute the hash locally:
 
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
+
* Download and extract this: https://lab.brainonfire.net/drop/geohash-offline.zip
* Working example: http://lab.brainonfire.net/geohash-offline/calc.html
+
* Working example: https://lab.brainonfire.net/geohash-offline/calc.html
  
 
;Notes
 
;Notes
Line 30: Line 37:
 
== k4 ==
 
== k4 ==
  
== k4 implementation ==
 
 
{{30w compliant|no=1}}
 
{{30w compliant|no=1}}
 
[[Implementations/Libraries/k4]]
 
[[Implementations/Libraries/k4]]
  
== PERL ==
+
== Lua ==
 +
 
 +
{{30w compliant|yes=1}}
 +
Geohash and globalhash calculation in Lua (almost pure, uses wget for web access): https://github.com/atenfyr/luaGH
 +
 
 +
==Mathematica==
 +
 
 +
{{30w compliant|yes=1}}
 +
[http://mathematica.stackexchange.com/q/26724/7835 Geohashing in Mathematica]
 +
 
 +
== perl ==
 
=== Geo::Hashing on CPAN ===
 
=== Geo::Hashing on CPAN ===
 
{{30w compliant|yes=1}}
 
{{30w compliant|yes=1}}
Line 47: Line 63:
  
 
== Python ==
 
== Python ==
 +
 +
=== [https://github.com/makeworld-the-better-one/geohashing/blob/master/geohashing.py geohashing.py] ===
 +
A python script by [[User:Cole]] that can calculate geohash coordinates, given a graticule. It can calculate globalhashes as well. It is meant to be used from the command line, but is based around functions that can be used for library usage.
 +
 
=== Code snippets ===
 
=== Code snippets ===
 
{{30w compliant|yes=1}}
 
{{30w compliant|yes=1}}
Line 72: Line 92:
  
 
[[Implementations/Libraries/Ruby]]
 
[[Implementations/Libraries/Ruby]]
 +
 +
== Rust ==
 +
{{30w compliant|yes=1}}
 +
 +
Available on [https://crates.io/crates/geohashing crates.io] or [https://gitlab.com/Sakuhl/geohashing GitLab].
 +
 +
Maintained by [[User:Kellerkind|Kellerkind]].
  
 
== Shell Script==
 
== Shell Script==
 
{{30w compliant|yes=1}}
 
{{30w compliant|yes=1}}
 
[[Implementations/Libraries/Shell]]
 
[[Implementations/Libraries/Shell]]
 +
 +
== C# ==
 +
{{30w compliant|yes=1}}
 +
 +
A C# command line tool, using dotnet core 3.1, where the implementation can easily be copied to other projects. Just copy two files and don't forget to mention where you found them.
 +
 +
Relies on geo.crox.net for the Dow Jones industrial average.
 +
 +
Source code and a windows binary is available on [https://github.com/roseeng/GeoHash Göran Roseen's github]
 +
 +
Maintained by [[User:Roseen|Göran Roseen]].
 +
 +
[[Category:Implementations]]

Latest revision as of 00:42, 15 April 2020

D

Local email tool in D, for Linux
This implementation IS FULLY 30W-compliant.

Run this program once a day (for instance, per crontab) to get email notification whenever Google Maps indicates the daily target is nearer than a specified range. The first time around, run it from the commandline to configure. Configuration is stored in ~/.geohash/geohash.cfg. Use --help for info about commandline parameters. Source. Linux 32-bit upx compressed binary. - Ported it again to my own language. Source. Linux 32-bit binary

Erlang

This implementation IS FULLY 30W-compliant.

Implementations/Libraries/Erlang

Clojure

This implementation IS FULLY 30W-compliant.

A geohash and globalhash library in Clojure: https://github.com/timmc/geohash

Maintained by Phyzome, who also runs an email autoresponder that uses this library.

Java

This implementation IS FULLY 30W-compliant.

A Java port of the Python implementation can be found from GitHub.

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:

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

This implementation IS NOT 30W-compliant.

Implementations/Libraries/k4

Lua

This implementation IS FULLY 30W-compliant.

Geohash and globalhash calculation in Lua (almost pure, uses wget for web access): https://github.com/atenfyr/luaGH

Mathematica

This implementation IS FULLY 30W-compliant.

Geohashing in Mathematica

perl

Geo::Hashing on CPAN

This implementation IS FULLY 30W-compliant.

Reusable code library that can be used from any perl program:

Geo::Hashing Sample code

Alternative implementations

This implementation IS FULLY 30W-compliant.

Alternatives to the official implementation can be found at Implementations/Libraries/Perl.

Python

geohashing.py

A python script by User:Cole that can calculate geohash coordinates, given a graticule. It can calculate globalhashes as well. It is meant to be used from the command line, but is based around functions that can be used for library usage.

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.

Ruby

This implementation IS FULLY 30W-compliant.

Implementations/Libraries/Ruby

Rust

This implementation IS FULLY 30W-compliant.

Available on crates.io or GitLab.

Maintained by Kellerkind.

Shell Script

This implementation IS FULLY 30W-compliant.

Implementations/Libraries/Shell

C#

This implementation IS FULLY 30W-compliant.

A C# command line tool, using dotnet core 3.1, where the implementation can easily be copied to other projects. Just copy two files and don't forget to mention where you found them.

Relies on geo.crox.net for the Dow Jones industrial average.

Source code and a windows binary is available on Göran Roseen's github

Maintained by Göran Roseen.