Geocode: Difference between revisions

Content deleted Content added
m Fix dashes, non-breaking spaces etc and tidy
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 and entities represented by it:
Line 17:
== 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:
* ''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 38:
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 common 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:
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:
[[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=http://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 95:
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:
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:
 
: [[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:
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.
 
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 <code>u09</code>, that code can be removed &mdash;. For instance Geohash <code>u09tut</code> can be reduced to <code>tut</code>, or, by an explicit code for context "FR-Paris <code>tut</code>". This 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 195:
|-
|[[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 203:
 
=== 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 333:
== 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>https://www.unsalb.org/]</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 347:
 
===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 374:
{{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 ]]