← Back

May 21, 2008

#426: Geohashing explain

Geohashing

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: https://xkcd.com/geohashing/