Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Coding Method  





2 Efficiency  





3 Implementations  



3.1  C





3.2  Ruby  







4 See also  





5 References  














Geohash-36







Add links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


The Geohash-36 geocode is an opensource compression algorithm for world coordinate data. It was developed as a variation of the OpenPostcode format developed as a candidate geolocation postcode for the Republic of Ireland.[1] It is calculated differently and uses a more concise base 36 representation rather than other geocodes that adopted base 32.[2]

Despite the name, there are no algorithmic (not use Z-order curve) or typological relationship with Geohash. 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

[edit]

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:

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Geohash-36 2 3 4 5 6 7 8 9 b B C d D F g G h H
 
Decimal 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Geohash-36 j J K l L M n N P q Q r R t T V W X

Characters are chosen to avoid vowels, 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 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

[edit]

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[3] 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.[4]

The Statue of Liberty, at coordinates 40.689167, −74.044444, is encoded as 9LVB4BH89g-m. The reverse decoding equates to 40.689168, −74.044445.

The Shard building, London, at coordinates 51.504444, −0.086667 is encoded as bdrdC26BqH-m (decodes to 51.504444, −0.086666), or may be successfully shorted to bdrdC26B.[5]

Implementations

[edit]

C

[edit]

Ruby

[edit]

See also

[edit]

References

[edit]
  1. ^ "DCENR Postcodes". Retrieved 26 June 2012.
  • ^ "Geohash Tips & Tricks". Retrieved 26 June 2012.
  • ^ "MSDN "decimal and numeric (Transact-SQL)"". Retrieved 26 June 2012.
  • ^ "Geohash-36". Archived from the original on 27 December 2012. Retrieved 26 June 2012.
  • ^ "Geo36.org". Retrieved 26 June 2012.
  • 6.^ "Geohashes" [1]. Retrieved 05 June 2024.


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Geohash-36&oldid=1227501385"

    Categories: 
    Compression algorithms
    Geocodes
    Hidden categories: 
    Articles needing additional references from June 2012
    All articles needing additional references
     



    This page was last edited on 6 June 2024, at 03:16 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki