Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Geocode
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== System == 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. === Encode and decode === 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. In spatial indexing applications the geocode can also be translated between human-readable (e.g. [[hexadecimal]]) and internal (e.g. [[64-bit computing|binary 64-bit unsigned integer]]) representations. === Systems of standard names === {{main|Toponym resolution}} 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). [[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" — so this set of codes will be a kind of "system of standard names". ==== Hierarchical naming ==== In the geocode context, [[space partitioning]] is the process of dividing a [[Space#Geographical space|geographical space]] into two or more [[Disjoint sets|disjoint]] [[subset]]s, resulting in a [[Tessellation|mosaic]] of subdivisions. Each subdivision can be partitioned again, [[Recursion|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 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 – 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. :<code>DE.NW.CE</code> - Kreis [[Coesfeld (district)|Coesfeld]]. A 3-level hierarchical geocode. Two geocodes of a ''hierarchical geocode system'' with same prefix represents different parts of the same location. For instance <code>DE.NW.CE</code> and <code>DE.NW.BN</code> represents geographically interior parts of <code>DE.NW</code>, the common prefix. Changing the ''subdivision criteria'' we can obtain other hierarchical systems. For example, for [[Drainage basin|hydrological criteria]] there is a geocode system, the US's [[Hydrological code|hydrologic unit code]] (HUC), that is a numeric representation of ''basin names'' in a hierarchical syntax schema (first level illustred). For example, the HUC <code>17</code> is the identifier of "[[Columbia River drainage basin|Pacific Northwest Columbia basin]]"; HUC <code>1706</code> of "[[Snake River|Lower Snake basin]]", a spatial [[subset]] of HUC <code>17</code> and a superset of <code>17060102</code> ("Imnaha River"). === Systems of regular grids === [[file:Ordnance_Survey_National_Grid.svg|thumb|420px|Each cell of a regular grid is [[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}} Inspired in the classic [[alphanumeric grid]]s, a [[discrete global grid]] ('''DGG''') is a regular [[Tessellation|mosaic]] which covers the entire [[Terrain|Earth's surface]] (the globe). The [[Euclidean tilings by convex regular polygons#Regular tilings|regularity of the mosaic]] is defined by the use of cells of same shape in all the grid, or "near the same shape and near same area" in a region of interest, like a country. 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 ==== Each cell of a grid can be transformed into a new local grid, in a [[Recursion|recurring process]]. In the illustrated example, the cell <code>TQ 2980</code> is a sub-cell of <code>TQ 29</code>, that is a sub-cell of <code>TQ</code>. A system of geographic regular [[grid reference]]s is the base of a ''hierarchical geocode system''. 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 <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> When human-readable codes obtained from cell identifiers of a DGGS are also standardized, it can be classified as ''DGGS based geocode system''. === Name-and-grid systems === 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: : [[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”--> For [[mnemonic]] coherent semantics, in fine-grained geocode applications, the mixed solutions are most suitable.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)