Geocode: Difference between revisions

Content deleted Content added
replacing with valid code examples, style
Line 77:
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.