Geocode: Difference between revisions

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
 
(31 intermediate revisions by 25 users not shown)
Line 2:
{{distinguish|Address geocoding}}
 
A '''geocode''' is a [[code]] that represents a geographic entity ([[___location]] or [[Geographical feature|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 (in bold) and entities represented by it:
 
Typical geocodes and entities represented by it:
* ''Country code'' and subdivision code. Polygon of the administrative boundaries of a country or a subdivision. <br />The main examples are ISO codes: [[ISO 3166-1 alpha-2]] code (e.g. '''<code>AF</code>''' for [[Afghanistan]] or '''<code>BR</code>''' for [[Brazil]]), and its subdivision conventions, such as [[ISO 3166-2:AF|{{mono|1=AF}} subdivision codes]] (e.g. '''<code>AF-GHO</code>''' for [[Ghor province]]) or [[ISO 3166-2:BR|{{mono|1=BR}} subdivision codes]] (e.g. '''<code>BR-AM</code>''' for [[Amazonas (Brazilian state)|Amazonas state]]).
 
* ''DGG cell ID''. Identifier of a cell of a [[discrete global grid]]: a [[Geohash]] code (e.g. ~0.023&{{nbsp;}}km<sup>2</sup> cell '''<code>6vjyngd6vd23gq</code>''' at the Brazil's [[NationalGeographical Congress of Brazilcentre|Brazilian's centercentroid]]) or ana [[Open Location Code|OLCPlus Code]] code (e.g. ~0.004&0002{{nbsp;}}km<sup>2</sup> cell '''<code>58PJ642P58Q8XXXX+4XX</code>''' atwithin the same pointarea).
 
* ''Postal code''. Polygon of a [[postal code|postal area]]: a [[Código de Endereçamento Postal|CEP]] code (e.g. '''<code>70040</code>''' represents a Brazilian's central area for postal distribution).
 
The [ISO&nbsp;19112:2019 standard<ref>"ISO 19112:2019 — Geographic information — Spatial referencing by geographic identifiers", "Section 3.1.2 — Geographic identifier", https://www.iso.org/standard/70742.html ISO 19112:2019] standard</ref> (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. Some authors, such as the United States Census Bureau,<ref>"Understanding Geographic Identifiers (GEOIDs)", https://www.census.gov/programs-surveys/geography/guidance/geo-identifiers.html</ref> use the abbreviation "GEOID" as a synonym for ''geocode''.
 
Geocodes are mainly used (in general as an [[Primitive data type|atomic data type]]) for [[labelling]], [[data integrity]], [[geotagging]] and [[Spatial database#Spatial index|spatial indexing]].
Line 17 ⟶ 20:
== Classification ==
[[File:Geocode-exemple1-MASP.png|thumb|420px|
Geocode cells of [[Geohash]], with 8 (blue) and 9 (yellow) digits, a typical ''hierarchical grid'', comparing with [[latitude-longitude]] (12 or more digits). A [[São Paulo Museum of Art|museum]] is a typical ___location to be pointed by a geocode, its gate need ~20 meters of precision.
]]
 
Line 24 ⟶ 27:
* ''Formation'': the geocode can be originated from a name (ex. abbreviation of official name the country) or from mathematical function ([[data compression|encoding]] algorithm to compress [[latitude-longitude]]). See ''geocode system'' types below (of [[#Systems of standard names|names]] and of [[#Systems of regular grids|grids]]).
* ''Hierarchy'': geocode's syntax hierarchy corresponding to the spatial hierarchy of its represented entities. A geocode system can hierarchical ([[#Hierarchical_naming|name]] or [[#Hierarchical_grids|grid]]) or non-hierarchical.
* ''Covering'': global or partial. The entities (represented by the geocodes) are in all globe (e. g. geographical points) or is delimited the theme (e.g. only terrestrial areas) or by the ownership's jurisdiction (e.g. only into a country).
* ''Type of the represented entity'': [[Well-known text representation of geometry|type of geometry]]. Point (the geocode can be translated to a [[Geo URI]]), grid cell (the geocode system is related with a [[discrete global grid|DGG]]) or polygon (typically administrative boundaries delimitations).
<!-- ** grids can be also classified as [[Discrete global grid#Hierarchical grids|''hierarchical'']] or [[Discrete global grid#Non-hierarchical grids|''non-hierarchical'']]-->
Line 34 ⟶ 37:
-->
 
== Geocode systemSystem ==
 
The set of all geocodes used as unique identifiers of the cells of a [[Tessellation#Voronoi tilings|full-coverage]] of the [[Terrain|geographic surface]] (or any well-defined area like a country or the oceans), is a '''geocode system''' (also named ''geocode scheme''). The [[Syntax (programming languages)|syntax]] and [[Semantics (computer science)|semantic]] of the geocodes are also components of the system definition:
* geocode '''syntax''': the characters that can be used, blocks of characters and its size and order. Example: country codes use two letters of the alphabet (chacacter set A-Z). The most commomcommon way to describe formally is by [[regular expression]] (e.g. <code>/[A-Z]{2,2}/</code>).
* geocode '''semantic''': the meaning of the geocode, usually expressed by associating the code with a geographical entity type. Can be described formally is by an [[Ontology (information science)|ontology]], an [[UML class diagram]] or any [[Entity-relationship model]]. <br />In general the semantic can be deduced by its formation or encoding/decoding process. Example: each Geohash code can be expressed by a rectangular area in the map, and the rectangle coordinates is obtained by its decoding process.
 
Many syntax and semantic characteristics are also summarized by classification.
Line 46 ⟶ 49:
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 [[Open Geospatial Consortium|OGC]],<ref name="OGC">Definitions of the [[Open Geospatial Consortium|OGC]]'s "[https://www.opengeospatial.org/ogc/glossary/g Glossary of Terms]".</ref> are:
 
;geocoder: A [[software agent]] that transforms the description of a geographic entity (e.g. ___location name or latitude/longitude coordinates), into a normalized data and encodes it as a geocode.
 
;geocoder service: A geocoder implemented as [[web service]] (or similar service interface), that accepts a set of geographic entity descriptors as input. The request is "sent" to the Geocoder Service, which processes the request and returns the resulting geocodes. More general services can also return geographic features (e.g. [[GeoJSON]] object) represented by the geocodes.
 
;geocoding: Geocoding refers to the assignment of geocodes or coordinates to geographically reference data provided in a textual format. Examples are the two letter country codes and coordinates computed from addresses.<br /> Note: when a [[Address#Current addressing schemes|physical addressing schemes]] (street name and house number) is expressed in a standardized and simplified way, it can be conceived as geocode. So, the term [[geocoding]] (used for addresses) sometimes is generalized for geocodes.
Line 61 ⟶ 64:
[[File:States of Germany coded.svg|thumb|200px|right|Germany (<code>DE</code>) with each [[States of Germany|first-level administrative subdivision]] labelled with the second part of its ISO 3166-2 code.]]
 
[[File:Huc region-edit.png|thumb|right|200px|The 21 top-level 2-digit "region" of hydrologic unit boundaries, using the HUC geocode conventions.]]
 
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 [[Map (mathematics)|relationship process]], usually effectuated by a software agent, between a toponym and "an unambiguous spatial footprint of the same place".<ref name="leidner2008toponym">{{cite thesis|
type=PhD
|last1=DeLozier|first1=Jochen L.
|date=2007|title=Toponym resolution in text: annotation, evaluation and applications of spatial grounding
|url=httphttps://www.era.lib.ed.ac.uk/handle/1842/1849|publisher=University of Edinburgh|hdl=1842/1849}}</ref> 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" &mdash; so this set of codes will be a kind of "system of standard names".
Line 77 ⟶ 80:
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 division|administrative subdivisions]] separated by hyphen. For example <code>DE</code> is [[Germany]], a simple geocode, and its subdivisions (illustrated) are <code>DE-BW</code> for [[Baden-Württemberg]], <code>DE-BY</code> for [[Bayern]], ..., <code>DE-NW</code> for [[Nordrhein-Westfalen]], etc. The scope is only the first level of the hierarchy. For more levels there are other conventions, like HASC code– Hierarchical Administrative Subdivision Codes.<ref>{{cite book|author=Gwillim Law|year=2016|title=Administrative Subdivisions of Countries: A Comprehensive World Reference, 1900 Through 1998|publisher=McFarland |isbn=978-0-7864-0729-3|url-access=registration|url=https://archive.org/details/administrativesu0000lawg}}</ref><ref>{{statoids|id=ihasc|title=Hierarchical administrative subdivision codes}}</ref> The HASC codes are alphabetic and its fragments have constant length (2 letters). Examples:
 
:<code>DE.NW</code> - [[North Rhine-Westphalia]]. A two-level hierarchical geocode.
Line 87 ⟶ 90:
 
=== Systems of regular grids ===
[[file:Ordnance_Survey_National_Grid.svg|thumb|420px|Each cell of a regular grid representsis [[Graph labeling|labeled]] by a geocode. The non-global grids were the most used before the 2000s. <br />This ''hierarchical system of local grids'', used since the 1930s as [[Ordnance Survey National Grid|British National Grid]], generates hierarchical geocodes. Each cell subdivides recurrently its area into a new 10x10 grid.]]
 
{{main|Discrete global grid#Geocoding variants{{!}}DGG geocoding variants}}
Line 95 ⟶ 98:
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 (computer science)|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.
 
==== Hierarchical grids ====
Line 102 ⟶ 105:
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: <code>TQ 28</code> and <code>TQ 61</code> represents geographically [[Interior (topology)|interior parts]] of <code>TQ</code>, the common prefix.
 
Hierarchical geocode can be split into keys. The [[Geohash]] <code>6vd23gq</code> is the key <code>q</code> of the cell <code>6vd23g</code>, that is a cell of <code>6vd23</code> (key <code>g</code>), and so on, per-digit keys. The [[Open Location Code|OLC]] <code>58PJ642P</code> is the key <code>48</code> of the cell <code>58PJ64</code>, that is a cell of <code>58Q8</code> (key <code>48</code>), and so on, two-digit keys. In the case of OLC there is a second key schema, after the <code>+</code> separator: <code>58PJ642P+48</code> is the key <code>2</code> of the cell&nbsp;<code>58PJ642P+4</code>. 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 <code>6vd2</code>, which is a [[base32]] code, can be expanded to [[Quaternary numeral system|base4]] <code>0312312002</code>, 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.<ref>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.</ref>
 
The uniformity of shape and area of cells in a grid can be important for other uses, like [[Spatial analysis|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 [[Open Geospatial Consortium|OGC]].<ref>"Topic 21: Discrete Global Grid Systems Abstract Specification", [[Open Geospatial Consortium]] (2017). https://docs.opengeospatial.org/as/15-104r5/15-104r5.html</ref>
Line 113 ⟶ 116:
 
: [[Mapcode]] entrance to the elevator of the [[Eiffel Tower]] in Paris is <code>FR-4J.Q2</code>, where <code>FR</code> is the name-code<ref>
See formal use of ISO country codes in Mapcode at https://www.mapcode.com/territory
</ref> and <code>4J.Q2</code> is the grid-code. Semantically France is the context, to obtain its local grid.<!-- can be expanded to “France 4J.Q2”-->
 
Line 122 ⟶ 125:
Any ''geocode system'' [[#Systems of regular grids|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 [[#Systems of standard names|geocode based on standard name]] (or abbreviation or the complete name) is easier to remember.
 
So, thisThis suggests that a "mixed code" can solve the problem, reducing the number of characters when a name can be used as the "context" offor 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 <code>u09</code>, itthat code can be removed &mdash;. forFor instance Geohash <code>u09tut</code> can be reduced to <code>tut</code>, or, by an explicit code for context "FR-Paris <code>tut</code>". ItThis is only possible when the context resolution (e.g. translation from "FR-Paris" to the prefix <code>u09</code>) is well-known.
 
In fact a methodology exists for [[#Hierarchical grids|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:
Line 140 ⟶ 143:
|}
 
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.<ref>{{Cite web|url=https://github.com/google/open-___location-code/wiki/Guidance-for-shortening-codes|title = Guidance for shortening codes · google/Open-___location-code Wiki|website = [[GitHub]]}}</ref> and using [[Plus Codes]] naming conventions.<ref>But Plus Codes are not generated by an open-source algorithm, see https://stackoverflow.com/q/58489357/287948</ref>
 
When the mixed reference is also short (9 characters in the second example) and there are a syntax convention to express it (suppose&nbsp;<code>CP‑PR~bgxed</code>), this convention is generating a new [[#Name-and-grid systems|name-and-grid geocode system]]. This is not the case of the first example because, strictly speaking, "Cape Verde, Praia" is not a code.
Line 147 ⟶ 150:
 
== Cataloged examples ==
{{self-referencemore cleanupreferences|section|date=SeptemberMay 20222024}}
 
=== In use, general scope ===
Geocodes in use and with general scope:
Line 177 ⟶ 179:
|-
| [[What3words]]|| 2013 || globe || encode(latLon) || '''patented''' || grid cell
| patent-restrictions system, converts 3x3 meter squares into 3 words.<ref>{{cite web|title=What3words: Find and share very precise locations via Google Maps with just 3 words|date=2 July 2013|url=https://thenextweb.com/apps/2013/07/02/what3words-a-new-way-to-search-for-and-share-locations-via-google-maps-with-just-3-words-universal-address-system/|access-date=8 July 2014}}</ref> It is in use at [[Mongol Post]].<ref>{{Cite web|url=httphttps://geospatial-solutions.com/mongolia-adopts-what3words-as-national-addressing-system/|title = Mongolia adopts what3words as national addressing system – Geospatial Solutions : Geospatial Solutions| date=June 2016 }}</ref>
 
|-
| [[Mapcode]] || 2001 || globe || encode(latLon) || '''patented''' || point
| A mapcode is a code consisting of two groups of letters and digits, separated by a dot.
 
|-
| Geopeg || 2020 || globe/only nations || encode(latLon) || '''open standard''' || 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. [https://geopeg.com/demo Geopeg]
|
|}
 
Line 191 ⟶ 198:
|-
|[[Open Location Code|Local OLC]] (Cape Verde)|| 2016 || globe || encode(latLon,precision) || free || grid cell
| OLC is used to provide postal services.<ref>(2016-09-08) "Correios de Cabo Verde testam novo sistema de endereçamento da Google", https://web.archive.org/web/20170209155133/http://aicep.pt/?%2Fnoticias%2F1%2F2534</ref>
|-
|[[Postal addresses in the Republic of Ireland#Eircode|Eircode]] (Ireland)|| 2014<ref>{{cite news|author=Dept of Communications |url=http://www.dcenr.gov.ie/news-and-media/en-ie/Pages/PressRelease/Minister-Rabbitte-launches-Eircode-the-new-___location-codes-for-Irish-addresses.aspx |title=Minister Rabbitte launches Eircode the new ___location codes for Irish addresses |publisher=[[DCENR]] |date=28 April 2014 |access-date=2015-07-15}}</ref> || Ireland || encode(latLon,precision) || copyrighted<ref>{{Cite web|url=https://www.eircode.ie/legal|title = Eircode Terms of Use}}</ref> || grid cell
Line 199 ⟶ 206:
 
=== In use, postal codes ===
Geocodes in use, as [[postal codes]]. A geocode recognized by [[Universal Postal Union]] and adopted as "official postal code" by a [[country]], is also a valid postal code. Not all postal codes are geographic, and for some postal code systems, there are codes that are not geocodes (e.g. [[Postcodes in the United Kingdom#Non-geographic codes|in UK system]]). Samples, not a complete list:
 
{|class="wikitable"|
Line 329 ⟶ 336:
== Other examples ==
Other geocodes:
* ''S2'': a geocoding scheme using [[spherical geometry]] and the space-filling [[Hilbert curve]], developed at [[Google]]<ref>{{Cite web|url=http://s2geometry.io/about/overview|title=Overview|website=s2geometry.io|language=en|access-date=2018-05-11}}</ref><ref>{{Cite web|url=https://medium.com/sidewalk-talk/s2-cells-and-space-filling-curves-keys-to-building-better-digital-map-tools-for-cities-a312aa5e2f59|title=S2 cells and space-filling curves: Keys to building better digital map tools for cities|last=Kreiss|first=Sven|date=2016-07-27|website=Medium|access-date=2018-05-11}}</ref>
* ''H3'': Hexagonal Hierarchical Spatial Index a geocoding scheme initially developed at Uber <ref>{{Cite web|url=https://www.uber.com/blog/h3/|title=Uber Blog announcing h3|website=uber.com|language=en|access-date=2023-02-08}}</ref> source code available <ref>{{Cite web|url=https://github.com/uber/h3|title=h3 open source code|website=github.com|language=en|access-date=2023-02-08}}</ref> and documented at h3geo <ref>{{Cite web|url=https://h3geo.org|title=h3 documentation|website=h3geo.org|language=en|access-date=2023-02-08}}</ref>
* ''Munich Orientation Convention'': converts lat/lon to metrical monopolar codes for targets, crossings, stations, stop points, bridges, tunnels, towns, islands, volcanoes, highway exits etc.<ref>[https://gssc.esa.int/navipedia/index.php/Step_By_Step_Navigation|Navipedia / ESA]{{dead link|date=December 2017 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>
* ''SALB'' (Second Administrative Level Boundaries), by UN [<ref>{{Cite web |url=https://www.unsalb.org/] |title=Second Administrative Level Boundaries |access-date=2020-04-09 |archive-date=2021-04-04 |archive-url=https://web.archive.org/web/20210404034644/https://www.unsalb.org/ |url-status=dead }}</ref>
* [[Postal addresses in the Republic of Ireland#OpenPostcode|OpenPostcode]], opensource global algorithm (local adaptations as Irish & Hong Kong postcodes).<ref>{{cite web|title=OpenPostcode.org|url=http://www.openpostcode.org|access-date=10 June 2012}}</ref>
* [[WOEID]]
Line 341 ⟶ 348:
* In the United States, the American National Standards Institute (ANSI) Codes are often used. ANSI INCITS 446-2008 is entitled "Identifying Attributes for Named Physical and Cultural Geographic Features (Except Roads and Highways) of the United States, Its Territories, Outlying Areas, and Freely Associated Areas, and the Waters of the Same to the Limit of the Twelve-Mile Statutory Zone".
* [[National Topographic System]] in Canada
* [[ONS coding system]] (hierarchical code used in the UK for tabulating census)
 
===Other standards===
Some standards and name servers include: ISO 3166, FIPS, INSEE, Geonames, IATA and [[International Civil Aviation Organization|ICAO]].
 
A number of commercial solutions have also been proposed:
Line 370 ⟶ 378:
{{Geocoding-systems}}
 
[[Category:Geocodes| for all types of data and information that is used to make a decision about a specific set of information and the information it provides for it]]
[[Category:Geocodes| ]]