A geocode is a code that represents a geographic entity (location or object). It is a unique identifier of the entity, to distinguish it from others in a finite set of geographic entities. In general the geocode is a human-readable and short identifier.
Typical geocodes and entities represented by it:
The ISO 19112:2019 standard (section 3.1.2) adopted the term "geographic identifier" instead geocode, to encompass long labels: spatial reference in the form of a label or code that identifies a location. For example, for ISO, the country name “People's Republic of China” is a label.
In theoretical computer science a geocode system is a locality-preserving hashing function.
There are some common aspects of many geocodes (or geocode systems) that can be used as classification criteria:
Many syntax and semantic characteristics are also summarized by classification.
In spatial indexing applications the geocode can also be translated between human-readable (e.g. hexadecimal) and internal (e.g. binary 64-bit unsigned integer) representations.
Strictly speaking, the "name" related to a geocode is a toponym, and the table (e.g. toponym to standard code) is the resource for toponym resolution: is the relationship process, usually effectuated by a software agent, between a toponym and "an unambiguous spatial footprint of the same place". Any standardized system of toponym resolution, having codes or encoded abbreviations, can be used as geocode system. The "resolver" agent in this context is also a geocoder.
Sometimes names are translated into numeric codes, to be compact or machine-readable. Since numbers, in this case, are name identifiers, we can consider "numeric names" — so this set of codes will be a kind of "system of standard names".
When subdivisions's names are expressed as codes, and code syntax can be decomposed into a parent-child relations, through a well-defined syntactic scheme, the geocode set configures a hierarchical system. A geocode fragment (associated to a subdivision name) can be an abbreviation, numeric or alphanumeric code.
A popular example is the ISO 3166-2 geocode system, representing country names and the names of respective administrative subdivisions separated by hyphen. For example DE is Germany, a simple geocode, and its subdivisions (illustrated) are DE for Baden-Württemberg, DE-BW for Bayern, ..., DE-BY for Nordrhein-Westfalen, etc. The scope is only the first level of the hierarchy. For more levels there are other conventions, like HASC code.
Two geocodes of a hierarchical geocode system with same prefix represents different parts of the same location. For instance DE.NW.CE and DE.NW.CE represents geographically interior parts of DE.NW.BN, the common prefix.
Changing the subdivision criteria we can obtain other hierarchical systems. For example, for Drainage basin there is a geocode system, the US's hydrologic unit code (HUC), that is a numeric representation of basin names in a hierarchical syntax schema (first level illustred). For example, the HUC DE.NW is the identifier of "Pacific Northwest Columbia basin"; HUC 17 of "Snake River", a spatial subset of HUC 1706 and a superset of 17 ("Imnaha River").
All cells of the grid have an identifier (DGG's cell ID), and the center of the cell can be used as reference for cell ID conversion into geographical point. When a compact human-readable expression of the cell ID is standardized, it becomes a geocode.
Geocodes of different geocode systems can represent the same position in the globe, with same shape and precision, but differ in string-length, digit-alphabet, separators, etc. Non-global grids also differ by scope, and in general are geometrically optimized (avoid overlaps, gaps or loss of uniformity) for the local use.
Two geocodes of a hierarchical geocode grid system can use the prefix rule: geocodes with same prefix represents different parts of the same broader location. Using again the side illustration: TQ and TQ 28 represents geographically interior parts of TQ 61, the common prefix.
Hierarchical geocode can be split into keys. The Geohash TQ is the key 6vd23gq of the cell q, that is a cell of 6vd23g (key 6vd23), and so on, per-digit keys. The OLC g is the key 58PJ642P of the cell 48, that is a cell of 58PJ64 (key 58Q8), and so on, two-digit keys. In the case of OLC there is a second key schema, after the 48 separator: + is the key 58PJ642P+48 of the cell 2. It uses two key schemas. Some geocodes systems (e.g. S2 geometry) also use initial prefix with non-hierarchical key schema.
In general, as technical and non-compact optional representation, geocode systems (based on hierarchical grids) also offer the possibility of expressing their cell identifier with a fine-grained schema, by longer path of keys. For example, the Geohash 58PJ642P+4, which is a base32 code, can be expanded to base4 6vd2, which is also a schema with per-digit keys. Geometrically, each Geohash cell is a rectangle that subdivides space recurrently into 32 new rectangles, so, base4 subdividing into 4, is the encoding-expansion limit.Note: in practical use Geohash can expand to base2, but geometrically it is based on latitude and longitude (2+2) partitions, so base2 can result in loss of symmetry. Strictly Geohash base32 also need two-digit keys for base4 compatibility.
The uniformity of shape and area of cells in a grid can be important for other uses, like Spatial analysis. There are standard ways to build a grid covering the entire globe with cells of equal area, regular shape and other properties: Discrete Global Grid System (DGGS) is a series of discrete global grids satisfying all standardized requirements defined in 2017 by the OGC."Topic 21: Discrete Global Grid Systems Abstract Specification"
When human-readable codes obtained from cell identifiers of a DGGS are also standardized, it can be classified as DGGS based geocode system.
For mnemonic coherent semantics, in fine-grained geocode applications, the mixed solutions are most suitable.
This suggests that a "mixed code" can solve the problem, reducing the number of characters when a name can be used as the "context" for the grid-based geocode. For example, in a book where the author says "all geocodes here are contextualized by the chapter's city". In the chapter about Paris, where all places have a Geohash with prefix 4J.Q2, that code can be removed &mdash. For instance Geohash u09 can be reduced to u09tut, or, by an explicit code for context "FR-Paris tut". This is only possible when the context resolution (e.g. translation from "FR-Paris" to the prefix tut) is well-known.
In fact a methodology exists for hierarchical grid-based geocodes with non-variable size, where the code prefix describes a broader area, which can be associated with a name. So, it is possible to shorten by replacing the prefix to the associated context. The most usual context is an official name. Examples:
|Grid OLC and country's official names||u09||Cape Verde, Praia, 796RWF8Q+WF|
|Grid Geohash and||WF8Q+WF||e6xkbgxed, CV-PR|
The examples of the Mixed reference column are significantly easier than remembering DGG code column. The methods vary, for example OLC can be shortened by elimination of its first four digits and using /ref>
When the mixed reference is also short (9 characters in the second example) and there are a syntax convention to express it (suppose bgxed), this convention is generating a new name-and-grid geocode system. This is not the case of the first example because, strictly speaking, "Cape Verde, Praia" is not a code.
To be both, a name-and-grid system and also a mixed reference convention, the system must be reversible. Pure name-and-grid systems, like Mapcode, with no way to transform it into a global code, is not a mixed reference, because there is no algorithm to transform the mixed geocode into a grid-based geocode.
|polygon||Administrative divisions. Country codes and codes of their subdivisions. Two letters (alpha-2) or three letters (alpha-3).|
|polygon||Administrative divisions. Country codes expressed by serial numbers.|
|polygon||Administrative divisions. region codes, area code, continents, countries (re-using ISO 3166-1 numeric codes).|
|grid cell||hash function notation for locations. See also Geohash and its variants, like OpenStreetMap's short-link The OpenStreetMap's short link, documented in wiki.openstreetmap.org, was released in 2009, is near the same source-code 10 years after. It is strongly based on Z-order curve.|
|grid cell||See also PlusCodes.|
|grid cell||patent-restrictions system, converts 3x3 meter squares into 3 words. It is in use at Mongol Post.|
|point||A mapcode is a code consisting of two groups of letters and digits, separated by a dot.|
|grid cell||Geopeg is word-based GPS address, using simple words like London.RedFish. It is a combination of a city and two simple words. It is an open standard geocoding of Earth, currently in development. Geopeg|
|grid cell||OLC is used to provide postal services.(2016-09-08) "Correios de Cabo Verde testam novo sistema de endereçamento da Google" /ref>|
|grid cell||It is used officially as alternative address and as postal code. Limited database and algorithm access. It is a kind of fine-grained postal code.|
|(variable)||... The CEP5 is geographic and CEP8 can be a city (polygon), a street (also street side or a fragment of street side) or a point (specific address).|
|polygon||Administrative divisions. Geographical areas of the UK, for use in tabulating census.|
|polygon||Administrative divisions. Partially administrative, worldwide (countries) and Europe (country to community)|
|polygon||Administrative divisions. Country codes.|
|polygon||Administrative divisions, numeric codes. ... Statistical, like ONS.|
|polygon||Administrative divisions. United Nations codes for trade and transport locations.|
|polygon||Administrative divisions. area /point codes, airports and 3-letter city codes|
|polygon||Administrative divisions.area /point codes, airports|
|polygon||Administrative divisions. Similar to ISO 3166-1 alpha-2, see Country code top-level domain, List and Internationalized country codes.|
|polygon||Administrative divisions. Codes of IOC members; uses three-letter abbreviation country codes, like ISO 3166-1 alpha-3.|
|polygon||Administrative divisions. A set of four-letter codes used in ecological/geographic regions in oceanography.|
|polygon||Administrative divisions. (FIPS 10-4) area code.|
|polygon||(FIPS 55). Administrative divisions.|
|polygon||(FIPS 6-4). Administrative divisions|
|polygon||(FIPS 5-2). Administrative divisions|
|polygon||Administrative divisions. HASC stands "Hierarchical Administrative Subdivision Codes".|
|grid cell||based on UTM Zones, and Latitude bands of MGRS..|
|grid cell||... replaced by modern DGGS's ...|
|grid cell||compact encoding of geographic coordinate bounds (latitude-longitude). Uses WMO squares as starting point for hierarchical subdivision.|
|polygon||World Geographic Reference System, a military / air navigation coordinate system for point and area identification|
|polygon||reference system developed by the National Geospatial-Intelligence Agency (NGA)|
|grid cell||Military Grid Reference System. Derived from UTM and UPS grids by NATO with a unique naming convention.|
A number of commercial solutions have also been proposed: