Geohash is a public domain geocode system invented in 2008 by Gustavo Niemeyer[2] which encodes a geographic location into a short string of letters and digits.
The core part of the Geohash algorithm and the first initiative to similar solution was documented in a report of G.M.
[3] The Morton work was used for efficient implementations of Z-order curve, like in this modern (2014) Geohash-integer version (based on directly interleaving 64-bit integers), but his geocode proposal was not human-readable and was not popular.
Apparently, in the late 2000s, G. Niemeyer still didn't know about Morton's work, and reinvented it, adding the use of base32 representation.
For example, the coordinate pair 57.64911,10.40744 (near the tip of the peninsula of Jutland, Denmark) produces a slightly shorter hash of u4pruydqqvj.
, the Geohash ezs42 can be converted to a decimal representation by ordinary positional notation: The geometry of the Geohash has a mixed spatial representation: It is possible to build the "И-order curve" from the Z-order curve by merging neighboring cells and indexing the resulting rectangular grid by the function
The most important property of Geohash for humans is that it preserves spatial hierarchy in the code prefixes.
The first step is decoding it from textual "base 32ghs", as showed above, to obtain the binary representation: This operation results in the bits 01101 11111 11000 00100 00010.
Points close to the North and South poles will have very different geohashes (different longitudes for near physical locations).
Two close locations on either side of the Equator (or Greenwich meridian) will not have a long common prefix since they belong to different 'halves' of the world.
Put simply, one location's binary latitude (or longitude) will be 011111... and the other 100000...., so they will not have a common prefix and most bits will be flipped.
Despite those issues, there are possible workarounds, and the algorithm has been successfully used in Elasticsearch,[7] MongoDB,[8] HBase, Redis,[9] and Accumulo[10] to implement proximity searches.
An alternative to storing Geohashes as strings in a database are Locational codes, which are also called spatial keys and similar to QuadTiles.
[13] In 2019 a front-end was designed by QA Locate[14] in what they called GeohashPhrase[15] to use phrases to code Geohashes for easier communication via spoken English language.
[21] This standard follows the Wikipedia article as of the 2023 version but provides additional detail in a formal (normative) reference.
In the absence of an official specification since the creation of Geohash, the CTA WAVE organization published CTA-5009 to aid in broader adoption and compatibility across implementers in the industry.