WIPIVERSE All articles

Geohashing

Overview
Geohashing is a term that refers to two distinct, well‑documented concepts:

  1. Geohash (spatial encoding) – a hierarchical spatial data structure that encodes a geographic location (latitude and longitude) into a short alphanumeric string.
  2. Geohashing (recreational activity) – an online, community‑driven game popularized by Randall Munroe’s webcomic xkcd (comic #426, 2008), in which participants generate a daily set of GPS coordinates derived from a cryptographic hash of the current date and a secret “stock phrase.”

Both usages are recognized in technical literature and among internet communities.


1. Geohash (Spatial Encoding)

Definition
A geohash is a method of converting a pair of latitude and longitude values into a single base‑32 string. The encoding subdivides the Earth’s surface into a grid of rectangular cells, recursively refining the cell size with each additional character. The resulting string preserves spatial proximity: points that are geographically close tend to share longer common prefixes.

History
The geohash algorithm was introduced by Gustavo Niemeyer in 2008 as an open‑source library for the Python programming language. It quickly spread to other languages and geographic information system (GIS) tools.

Technical Details

  • The Earth is represented by latitude (‑90° to +90°) and longitude (‑180° to +180°).
  • The algorithm interleaves binary representations of latitude and longitude, then groups bits into five‑bit chunks, each mapped to a base‑32 character (0–9, b–h, j–k, m–n, p–z).
  • The length of the geohash determines its precision; for example, a 6‑character geohash corresponds to an area of roughly 1.2 km × 0.6 km, while a 12‑character geohash resolves to about 0.6 m × 0.3 m.
  • Decoding reverses the process, yielding latitude/longitude bounds for the represented cell.

Applications

  • Spatial indexing in databases (e.g., Elasticsearch, MongoDB) to support fast geographic queries.
  • Bounding‑box searches for location‑based services.
  • Simplified storage and sharing of coordinates in URLs, QR codes, and sensor data streams.

References


2. Geohashing (Recreational Activity)

Definition
Geohashing, in the context of the xkcd webcomic, is a community activity where participants generate a daily target location by hashing the current UTC date together with a secret “stock phrase.” The resulting hash is converted into a pair of latitude and longitude coordinates, which participants attempt to reach physically.

Procedure

  1. Date selection – Use the current UTC date in the format YYYY‑MM‑DD (e.g., 2026‑07‑09).
  2. Stock phrase – A phrase selected by the user; the official “stock phrase” for a given day is the title of the xkcd comic published on that date.
  3. Hash computation – Concatenate the date string, a hyphen, and the stock phrase, then compute the SHA‑1 hash.
  4. Coordinate extraction – Convert the first 16 hexadecimal digits of the hash into a decimal fraction for latitude, and the next 16 digits into a decimal fraction for longitude. These fractions are added to the integer parts of the UTC date’s latitude and longitude (determined by the nearest whole‑degree grid cell).
  5. Travel – Participants travel to the generated “geohash point,” optionally documenting the visit with photographs.

Community
The activity is coordinated through the website geohashing.org, which archives daily hashes, provides tools for calculating coordinates, and hosts a forum where participants share experiences, maps, and “plugs” (photos taken at the location). The community maintains a set of conventions, such as “inside‑city” (when the hash falls inside a populated area) and “outside‑city” rules for selecting alternative nearby points.

Impact

  • Encourages outdoor exploration and geographic curiosity.
  • Has inspired related “hash‑based” games and variations (e.g., “random walk” challenges).
  • Contributed to discussions on the usability of cryptographic hashes for location generation.

References

  • Munroe, R. (2008). xkcd comic #426, “Geohashing”.
  • Geohashing.org – “How to Geohash” guide (accessed July 2026).

Related Terms

  • Geohash (algorithm) – often used interchangeably with “Geohash” but distinct from the recreational activity.
  • Geocode – the process of converting a human‑readable address into geographic coordinates, unrelated to geohashing.

This entry presents verified information about both the technical encoding method and the internet‐based game known as geohashing.

Browse

More topics to explore

    Browse all articles