Geohash-36
   HOME

TheInfoList



OR:

The Geohash-36 geocode is an
opensource Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized so ...
compression algorithm for world coordinate data. It was developed as a variation of the OpenPostcode format developed as a candidate
geolocation Geopositioning, also known as geotracking, geolocalization, geolocating, geolocation, or geoposition fixing, is the process of determining or estimating the geographic position of an object. Geopositioning yields a set of geographic coordinates ...
postcode for the Republic of Ireland. It is calculated differently and uses a more concise
base 36 A senary () numeral system (also known as base-6, heximal, or seximal) has six as its base. It has been adopted independently by a small number of cultures. Like decimal, it is a semiprime, though it is unique as the product of the only two con ...
representation rather than other geocodes that adopted
base 32 Base32 is the base-32 numeral system. It uses a set of 32 digits, each of which can be represented by 5 bits (25). One way to represent Base32 numbers in a human-readable way is by using a standard 32-character set, such as the twenty-two upper ...
. Despite the name, there are no algorithmic (not use
Z-order curve In mathematical analysis and computer science, functions which are Z-order, Lebesgue curve, Morton space-filling curve, Morton order or Morton code map multidimensional data to one dimension while preserving locality of the data points. It i ...
) or typological relationship with
Geohash Geohash is a public domain geocode system invented in 2008 by Gustavo NiemeyerEvidences at the Wayback Machine: labix.org in 2008, the G. Niemeyer's blog announcing Geohash *an article about Geohash witnessing and citing G. Niemeyer works, befor ...
. It is a publicity strategy to relate to a popular geocode of base 32. The encode/decode functions are not mathematically-similar to Geohash functions.


Coding Method

Designed for URLs and electronic storage and communication rather than human memory and conversation, it is case-sensitive, using a 36 character alphabet: "23456789bBCdDFgGhHjJKlLMnNPqQrRtTVWX". Character Conversion: Characters are chosen to avoid
vowel A vowel is a syllabic speech sound pronounced without any stricture in the vocal tract. Vowels are one of the two principal classes of speech sounds, the other being the consonant. Vowels vary in quality, in loudness and also in quantity (leng ...
s, vowel-like numbers, character confusion, and to use lowercase characters which are generally distinct from their uppercase equivalents in standard typefaces. The code can be of varying length and thus precision. Each character represents a further subdivision in a 6 by 6 grid - starting at the North-West (top-left) coordinate and continuing, row by row, to the South-East (bottom-right). Neighbouring coordinates have largely similar encodings and generally vary at the rightmost characters only; however extreme edge cases exist where neighbouring coordinates are on opposing sides of a grid division. Codes sort logically but not in ordinary coordinate order. Without vowels, unintended English-language words are avoided that may appear in the original Geohash code. As vowels are not used, an altitude component of encoded meters is optional with a prefixing "A" character (below sea-level prefixed by a lowercase "a"). An optional
checksum A checksum is a small-sized block of data derived from another block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. By themselves, checksums are often used to verify data ...
is represented using the lowercase English alphabet. It confirms the code as a Geohash-36 and provides a check for incorrect or transposed characters. It is calculated as modulus 26 of the sum of each character value (the altitude delimiters of "A" or "a" are valued at zero) multiplied by its position reading from left to right.


Efficiency

Compared to storing GPS coordinates using the Decimal datatype in SQL the Geohash-36 does not save significantly on database bytes. Using DECIMAL(8,5) and DECIMAL(7,5) requires 10-bytes and is accurate to about 1.1 metre squared (or better further from the equator). An equivalent 10-bytes of the Geohash-36 code is accurate to approximately a 6th of square meter. The Statue of Liberty, at coordinates 40.689167, −74.044444, is encoded as 9LVB4BH89g-m. The reverse decoding equates to 40.68916''8'', −74.044445. The
Shard Shard or sherd is a sharp piece of glass, pottery or stone. Shard may also refer to: Places * Shard End, a place in Birmingham, United Kingdom Architecture * Dresden Shard, a redesign of the Bundeswehr Military History Museum in Dresden, Germa ...
building, London, at coordinates 51.504444, −0.086667 is encoded as bdrdC26BqH-m (decodes to 51.504444, −0.08666''6''), or may be successfully shorted to bdrdC26B.


Implementations


C


'libgeohash36'
– a pure C implementation of Geohash-36 algorithm.


Ruby


'Geohash36'
– a Ruby implementation of the Geohash-36 algorithm.


See also

*
List of geodesic-geocoding systems A discrete global grid (DGG) is a tessellation, mosaic that covers the entire Earth's surface. Mathematically it is a space partitioning: it consists of a set of non-empty regions that form a Partition of a set, partition of the Earth's surface. ...


References

{{geocoding-systems Compression algorithms Geocodes