Geocodes: The Systems and Standards of Geographic Identifiers
A geocode, or geographic identifier (geo ID), is a unique code used to represent a specific geographic entity, such as a location or a physical object. Unlike raw coordinates, geocodes are typically designed to be short and human-readable, though the ISO 19112 standard also allows for longer labels. These identifiers serve as atomic data types essential for labeling, maintaining data integrity, geotagging, and spatial indexing.
Geocodes can represent various types of geometries. Some identify a point (which can be translated into a Geo URI), while others represent a grid cell or a polygon, such as the administrative boundaries of a city or country.
Key Facts
- Purpose: Geocodes simplify complex spatial data into short, manageable identifiers for indexing and tagging.
- Standardization: WGS84 is the de facto standard coordinate system and ellipsoid of reference for most modern geocodes.
- Hierarchy: Many systems use a hierarchical structure where a prefix represents a broad area and subsequent characters narrow the location.
- Diversity: Systems range from administrative (ISO 3166) and postal (ZIP, CEP) to grid-based (Geohash, Plus Codes).
Classification of Geocode Systems
Geocode systems are generally classified based on their structure and the type of entity they represent.
Hierarchy and Geometry
A system is hierarchical if its syntax reflects a spatial hierarchy (e.g., Country > State > City). Non-hierarchical systems do not follow this parent-child relationship. The geometry represented can be a point, a polygon, or a cell within a Discrete Global Grid System (DGGS)—a specialized grid with global coverage and equal-area cells.
Syntax and Encoding
The syntax of a geocode defines the characters used and their order, often described using regular expressions. For example, ISO country codes use a two-letter alphabet set (A-Z). In spatial indexing, these human-readable codes (like hexadecimal) are often translated into internal binary representations, such as 64-bit unsigned integers, for faster computer processing.
Hierarchical Naming and Administrative Systems
Hierarchical naming occurs when subdivision codes are decomposed into parent-child relations. A prominent example is the ISO 3166-2 system. In this system, a country code like DE (Germany) serves as the parent, while subdivisions like DE-BW (Baden-Württemberg) or DE-NW (North Rhine-Westphalia) serve as children.
Other systems provide deeper levels of granularity. The HASC (Hierarchical Administrative Subdivision Codes) use constant two-letter fragments to reach deeper levels, such as DE.NW.CE for Kreis Coesfeld. Similarly, the Hydrologic Unit Code (HUC) uses numeric representations for water basins; for instance, HUC 17 represents the Pacific Northwest Columbia basin, while HUC 1706 represents the smaller Lower Snake basin.


Regular and Hierarchical Grids
Grid-based geocodes divide the Earth's surface into regular cells. In a hierarchical grid, each cell can be recursively subdivided into a smaller local grid. This allows for a "prefix rule," where geocodes sharing the same starting characters are located within the same broader area.
For example, in the Geohash system, a code like 6vd23gq is a specific cell within the broader cell 6vd23. Similarly, Open Location Codes (OLC), also known as Plus Codes, use a similar recursive subdivision. Some systems, like S2 geometry, utilize spherical geometry and space-filling Hilbert curves to manage these cells.


Mixed Name-and-Grid Systems
To make long grid-based codes easier to remember, some systems use a "mixed" approach. By providing a known context (like a city name), the common prefix of a grid code can be removed. For example, instead of a full Geohash, a user might use "FR-Paris tut," where "FR-Paris" provides the necessary context to resolve the shortened grid code "tut."
Comparison of Common Geocode Systems
The following table summarizes several widely used geocode systems across different sectors.
| Geocode System | Entity Type | Coverage | Primary Use |
|---|---|---|---|
| ISO 3166 | Polygon | Global | Administrative boundaries |
| Geohash | Grid Cell | Global | Spatial indexing/Hash notation |
| Open Location Code | Grid Cell | Global | Digital addressing |
| What3words | Grid Cell | Global | Precise 3x3m location identification |
| CEP / ZIP | Polygon/Point | National | Postal distribution |
| IATA/ICAO | Polygon/Point | Global | Airport identification |
Frequently Asked Questions
What is the difference between a geocode and a coordinate?
Coordinates (latitude and longitude) are precise numerical values representing a point on a sphere. A geocode is a unique identifier—often a short string of letters or numbers—that represents a geographic entity, which could be a point, a grid cell, or an entire administrative region.
What is a Discrete Global Grid System (DGGS)?
A DGGS is a standardized series of discrete global grids that cover the entire Earth with cells of equal area and regular shape, facilitating more accurate spatial statistics and global analysis.
How does a hierarchical geocode work?
A hierarchical geocode uses a syntax where the first part of the code identifies a large area, and each subsequent part identifies a smaller area within that parent region. This allows users to determine the general location of an entity just by looking at the beginning of the code.
Are all postal codes considered geocodes?
Not necessarily. While many postal codes (like the Brazilian CEP) represent geographic polygons or points, some postal systems include codes that are not strictly geographic in nature.
What is the purpose of a "mixed" geocode?
Mixed geocodes combine a standard name or abbreviation (the context) with a shortened grid code. This reduces the number of characters a human needs to remember while maintaining the precision of a grid-based system.