From OpenStreetMap Wiki
Jump to navigation Jump to search

Geohash is a public domain geocoding system that encodes a geographic location (LatLong) into a short string of letters and digits (a base32 positive integer number).

Geohash is a de facto standard to enconde LatLong coordinates in only one number, accepted by PostGIS and many others tools.


OSM Tools:

  • JOSM GeoHash plugin displays a layer on top of the JOSM map that contains the corresponding geohashes, up to a depth of 10. This means that the geohash can have a code length of maximum 10 characters.

Non-OSM to OSM or general use:

Non-OSM to other maps:

Comparison with other solutions

Consider for example zooming in on the Singapure's Merlion (Wikidata Q208760), an ~8mx3m map feature, as element into the OpenStreetMap.

Geohash is a kind of "hyerarchical-cells coordinate system", so can be compared with different "cell resources". Example:

After 4 refinements one lands on Merlion park as 6PH57VP3+PR.
It is a 10 characters code, representing a ~10m×10m box. The same point of a ~5m×5m box in the Geohash representation, w21z76281, consumes 9 characters.

Solution Template URL Pros Cons
Geohash at OSM - ideal OSM's redirection (is a fantasi, not exists) OSM.ORG/G{geohashCode} Short URL, good and precise zoom and renderization (no relevant problem)
Geohash at - bad OSM's redirection{geohashCode} Short URL No zoom, no cell renderization
Geohash at - good renderization but no redirection 2 3 4
? Good zoom and renderization (no redirection) 3 4
PlusCode .../{PlusCode} ... ...
Mapcode .../{Mapcode} ... ...
what3words ([Wikipedia]( Easy to remember... 2 3 4

IMPORTANT-1: Mapcode and What3words are patented systems, so they are not suject to selection or merit, only to technical analisis.

IMPORTANT-2: the What3words strategy to translate the geo-ID into dictionary words can be reproduced by any other code, using a non-copyrighted set of words of any language. It is good to write at Telegram or Whatsapp chats, but it is not a good choice for official ID of a Map Feature or address. So it its a "secondary ID" (translated), and can enhance and can be removed from comparisons.

Administrative names conventions

Standards like ISO_3166-2 when adopted for principal subdivisions (by for instance AD, AR, BR or CL), can be conjugated with city names or city-3-letter abbreviations to express a cell (so a prefix of internal cells), a reference system or a "local BBOX". For Singapure suppose SG or SG-1.

Solution - city City mnemonic (len) Prefix (len) Complete Feature code (len) Feature code (len) Complete Feature alias (len)
Geohash - Singapure SG-1 (3) w21 (3) w21z7628 (8) z7628 (5) SG1-Z7628 (8)
PlusCode - Singapure Singapure (9) 6PH5 (4) 6PH57VP3+PR6 (11) 7VP3+PR6 (7) 7VP3+PR6 Singapure (16)
Adapted PlusCode - Singapure SG-1 (3) 6PH5 (4) 6PH57VP3+PR6 (11) 7VP3+PR6 (7) 7VP3+PR6 SG-1 (10)
Mapcode - Singapure SGP (3) SPG (3) HSF9S.TNMH (9) NP.PZ (4) SGP NP.PZ (7)