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:
AF
for Afghanistan or BR
for Brazil), and its subdivision conventions, such as AF subdivision codes (e.g. AF-GHO
for Ghor province) or BR subdivision codes (e.g. BR-AM
for Amazonas state).6vjyngd
at the Brazilian's center) or an OLC code (e.g. ~0.004 km2 cell 58PJ642P+4
at the same point).70040
represents a Brazilian's central area for postal distribution).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.
Geocodes are mainly used (in general as an atomic data type) for labelling, data integrity, geotagging and spatial indexing.
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:
El conjunto de todos los códigos geográficos utilizados como identificadores únicos de las celdas de una cobertura total de la superficie geográfica (o cualquier área bien definida como un país o los océanos), es un sistema de código geográfico (también llamado esquema de código geográfico ). La sintaxis y la semántica de los códigos geográficos también son componentes de la definición del sistema:
/[A-Z]{2,2}/
.).Many syntax and semantic characteristics are also summarized by classification.
Any geocode can be translated from a formal (and expanded) expression of the geographical entity, or vice versa, the geocode translated to entity. The first is named encode process, the second decode. The actors and process involved, as defined by OGC,[3] are:
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.
Geocodes like country codes, city codes, etc. comes from a table of official names, and the corresponding official codes and geometries (typically polygon of administrative areas). "Official" in the context of control and consensus, typically a table controlled by a standards organization or governmental authority. So, the most general case is a table of standard names and the corresponding standard codes (and its official geometries).
DE
) with each first-level administrative subdivision labelled with the second part of its ISO 3166-2 code.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".[4] 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".
In the geocode context, space partitioning is the process of dividing a geographical space into two or more disjoint subsets, resulting in a mosaic of subdivisions. Each subdivision can be partitioned again, recursively, resulting in an hierarchical mosaic.
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-BW
for Baden-Württemberg, DE-BY
for Bayern, ..., DE-NW
for Nordrhein-Westfalen, etc. The scope is only the first level of the hierarchy. For more levels there are other conventions, like HASC code.[5][6] The HASC codes are alphabetic and its fragments have constant length (2 letters). Examples:
DE.NW
- North Rhine-Westphalia. A two-level hierarchical geocode.DE.NW.CE
- Kreis Coesfeld. A 3-level hierarchical geocode.Dos códigos geográficos de un sistema de códigos geográficos jerárquicos con el mismo prefijo representan diferentes partes de la misma ubicación. Por ejemplo DE.NW.CE
, y DE.NW.BN
representa partes geográficamente interiores de DE.NW
, el prefijo común.
Cambiando los criterios de subdivisión podemos obtener otros sistemas jerárquicos. Por ejemplo, para los criterios hidrológicos existe un sistema de geocodificación, el código de unidad hidrológica de EE. UU. (HUC), que es una representación numérica de los nombres de las cuencas en un esquema de sintaxis jerárquica (se ilustra el primer nivel). Por ejemplo, el HUC 17
es el identificador de la " cuenca del Pacífico Noroeste de Columbia "; HUC 1706
de la " cuenca Lower Snake ", un subconjunto espacial de HUC 17
y un superconjunto de 17060102
("Río Imnaha").
Inspirada en las clásicas cuadrículas alfanuméricas , una cuadrícula global discreta ( DGG ) es un mosaico regular que cubre toda la superficie de la Tierra (el globo). La regularidad del mosaico se define por el uso de celdas de la misma forma en toda la cuadrícula, o "casi de la misma forma y cerca de la misma área" en una región de interés, como un país.
Todas las celdas de la cuadrícula tienen un identificador (ID de celda de DGG) y el centro de la celda se puede utilizar como referencia para convertir el ID de celda en un punto geográfico. Cuando se estandariza una expresión compacta legible por humanos de la identificación de la celda, se convierte en un código geográfico.
Los códigos geográficos de diferentes sistemas de código geográfico pueden representar la misma posición en el mundo, con la misma forma y precisión, pero difieren en la longitud de la cadena , el alfabeto de los dígitos, los separadores, etc. Las cuadrículas no globales también difieren en su alcance y, en general, están optimizadas geométricamente. (evitar superposiciones, espacios o pérdida de uniformidad) para uso local.
Cada celda de una grilla se puede transformar en una nueva grilla local, en un proceso recurrente . En el ejemplo ilustrado, la celda TQ 2980
es una subcelda de TQ 29
, es decir, una subcelda de TQ
. Un sistema de referencias geográficas regulares de cuadrícula es la base de un sistema de geocodificación jerárquico .
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 28
and TQ 61
represents geographically interior parts of TQ
, the common prefix.
Hierarchical geocode can be split into keys. The Geohash 6vd23gq
is the key q
of the cell 6vd23g
, that is a cell of 6vd23
(key g
), and so on, per-digit keys. The OLC 58PJ642P
is the key 48
of the cell 58PJ64
, that is a cell of 58Q8
(key 48
), and so on, two-digit keys. In the case of OLC there is a second key schema, after the +
separator: 58PJ642P+48
is the key 2
of the cell 58PJ642P+4
. 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 6vd2
, which is a base32 code, can be expanded to base4 0312312002
, 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.[7]
The uniformity of shape and area of cells in a grid can be important for other uses, like spatial statistics. 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.[8]When human-readable codes obtained from cell identifiers of a DGGS are also standardized, it can be classified as DGGS based geocode system.
There are also mixed systems, using a syntactical partition, where for example the first part (code prefix) is a name-code and the other part (code suffix) is a grid-code. Example:
FR-4J.Q2
, where FR
is the name-code[9] and 4J.Q2
is the grid-code. Semantically France is the context, to obtain its local grid.For mnemonic coherent semantics, in fine-grained geocode applications, the mixed solutions are most suitable.
Any geocode system based on regular grid, in general is also a shorter way to express a latitudinal/longitudinal coordinate. But a geocode with more than 6 characters is difficult for remember. On the other hand, a geocode based on standard name (or abbreviation or the complete name) is easier to remember.
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 u09
, that code can be removed —. For instance Geohash u09tut
can be reduced to tut
, 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 u09
) 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:
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 attaching a suitable sufficiently close locality.[10]
When the mixed reference is also short (9 characters in the second example) and there are a syntax convention to express it (suppose CP‑PR~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.
Geocodes in use and with general scope:
Los códigos geográficos se pueden utilizar en lugar de los nombres oficiales de calles y/o números de casas , especialmente cuando las autoridades no han asignado una dirección a una ubicación determinada. También se pueden utilizar como una "dirección alternativa" si se puede convertir a un Geo URI . Incluso si el código geográfico no es la designación oficial de una ubicación, puede usarse como un "estándar local" para permitir que los hogares reciban entregas, accedan a servicios de emergencia, se registren para votar, etc.
Geocódigos en uso, como códigos postales . Un código geográfico reconocido por la Unión Postal Universal y adoptado como "código postal oficial" por un país , también es un código postal válido. No todos los códigos postales son geográficos y, para algunos sistemas de códigos postales, hay códigos que no son códigos geográficos (por ejemplo, en el sistema del Reino Unido ). Ejemplos, no una lista completa:
Geocódigos en uso para el ámbito de telefonía o radiodifusión:
Geocódigos en uso y con alcance específico:
Other geocodes:
Some standards and name servers include: ISO 3166, FIPS, INSEE, Geonames, IATA and ICAO.
A number of commercial solutions have also been proposed: