Difference between revisions of "426: Geohashing"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Explanation: added hash function Wikipedia link to description of the algorithm)
m (Explanation: Just fixed the incomplete section to show the MD5 instead of MP5)
Line 8: Line 8:
  
 
==Explanation==
 
==Explanation==
{{incomplete|explain terminology used in determining location (ie mp5)}}
+
{{incomplete|explain terminology used in determining location (ie md5)}}
 
{{w|Geocaching}} is a sport where you have to find things hidden by other people based on geographical coordinates. Randall has had a similar idea before in [[201: Christmas GPS]].
 
{{w|Geocaching}} is a sport where you have to find things hidden by other people based on geographical coordinates. Randall has had a similar idea before in [[201: Christmas GPS]].
  

Revision as of 23:05, 10 January 2014

Geohashing
Saturday is game night
Title text: Saturday is game night

Explanation

Ambox notice.png This explanation may be incomplete or incorrect: explain terminology used in determining location (ie md5)
If you can address this issue, please edit the page! Thanks.
Geocaching is a sport where you have to find things hidden by other people based on geographical coordinates. Randall has had a similar idea before in 201: Christmas GPS.

Geohashing is a sport created by Randall based on reaching a random location determined by an algorithm that uses a hash function that involves the current date, location and Dow opening price.

The algorithm is built in a way that:

  • Makes it impossible to plan a meeting in advance - because of the Dow.
  • Changes every day.
  • Gathers people that are nearby - everyone within the same 1°×1° grid square gets the same position.

The algorithm works as follows:

  1. Take the current date in the format yyyy-mm-dd- and append the most recent opening value for the Dow Jones Industrial Average.
  2. Pass this sting through the MD5 algorithm.
  3. Divide the hash value into two 16 character halves, and convert each half to a decimal.
  4. Take the integer portions of your current current coordinates and append the decimal hash values.

MD5 is a cryptographic hashing algorithm, and converts plaintext data into a seemingly random 128-bit (32 character) string. A good hashing algorithm should have three main properties: it is non-reversible (you cannot generate any plaintext data from the hash), a given sample of data will always produce the same hash value, and even a tiny change to the original plaintext should produce an entirely different hash.

Originally intended as a joke, there are people which do geohashing regularly. Please see the link to the xkcd wiki above.

Transcript

Date (example): 2005-05-26
That date's (or most recent) DOW opening: 10458.68
[Concatenate, with a hyphen: 2005-05-26-10458.68]
md5: db9318c2259923d08b672cb305440f97
[Split it up into two pieces:]
0.db9318c2259923d0, 0.8b672cb305440f97
To decimal: 0.857713..., 0.544544...
Your location (example): 37.421542, -122.085589
[Combine integer part of location with fractional part of hash:]
Destination Coordinates: 37.857713, -122.544544
Sample Implementation: http://xkcd.com/geohashing/

Trivia

  • In response to comic 353: Python, the Python developers implemented the module antigravity in version 2.7+. This module contains a reference geohashing function.


comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!

Discussion

No comments yet!