OpenStreetMap: Admin_level for All Countries
OpenStreetMap: Global Guide to admin_level
The boundary=administrative tag is a fundamental component of OpenStreetMap (OSM), used to delineate territories that are officially recognized by governments for the purpose of administration.
📌 Technical Overview
| Key | Value | Description |
|---|---|---|
boundary | administrative | An area recognized by a government for administrative purposes. |
admin_level | 1 to 11 | A numerical value indicating the hierarchy/importance of the boundary. |
Structural Implementation
These boundaries are typically mapped as relations. Much like a multipolygon, an administrative relation is composed of one or more boundary ways that form a closed loop.
Mapping Recommendations:
- Preferred Method: Use
type=boundaryrelations. - Way Tagging: The ways that make up the boundary can be left untagged (using only
outerorinnerroles), though duplicatingboundary=administrativeon the ways is common and acceptable. - Overlap: Some areas may also be tagged with
place=*.
🗺️ Locating and Mapping Boundaries
Mapping political lines is complex. Editors should adhere to the following guidelines to ensure data accuracy and stability.
1. Handling Disputed Territories
OSM does not take political stances. Instead, it adheres to the "On the Ground Rule".
The On the Ground Rule: Boundaries in OSM should reflect the most widely recognized international borders and, more importantly, the actual physical control of the territory.
- Approximate Lines: In regions where borders are not clearly defined, the line is considered an approximation.
- Reality vs. Idealism: The goal is to map the world
as it should beas it actually exists. - Overlaps: It is not necessarily an error if boundaries overlap. This can happen if:
- Two nations administer an area jointly.
- A region is claimed by multiple parties but controlled by none.
- Subnational boundaries are complex and non-nested.
2. Maritime Boundaries
Administrative boundaries are not infinite; they have specific limits at sea.
- Included: Land, internal waters, and the territorial sea (typically nautical miles).
- Excluded: International waters must never be part of an administrative relation.
- Further Detail: For specialized maritime zones, use
boundary=maritime.
3. Boundaries Following Linear Features (Rivers/Roads)
A common mistake is "gluing" (sharing nodes) between a boundary and a river or road.
Why avoid gluing? If a river changes course and an editor moves the river way, they might accidentally move the political border. Most borders are defined by a historical snapshot (e.g., "the course of the river as of 1995"), meaning the border stays put even if the water moves.
When is gluing okay? Only if the legal definition of the border explicitly states it follows the current thalweg or channel of the river.
4. Preventing Accidental Edits
To avoid unintentionally altering a boundary while editing other features:
- iD Editor: Use the 'Map Data' filters to hide boundary layers.
- JOSM: Use filters to toggle the visibility of administrative relations.
📊 The admin_level Hierarchy
The admin_level tag defines the scale of the administrative unit. The range is generally defined as:
General Hierarchy
- Super-national: Large groups of states (e.g., European Union).
- National: Sovereign states.
- Sub-national: Provinces, states, districts, and municipalities.
Rendering and Specifics
The visual representation (rendering) of these levels varies by style, but generally, lower numbers represent larger, more significant areas. Because administrative structures differ globally, the specific meaning of admin_level=4 in one country may differ from admin_level=4 in another.
🛠️ Mapping Checklist
- Is the boundary a
type=boundaryrelation? - Does the relation form a closed area?
- Is the
admin_levelappropriate for the region? - Have I avoided gluing the border to a river unless legally required?
- Does the boundary exclude international waters?
🖼️ Visual References
Example of a local administrative boundary marker.
Quick Icons:
![]()
Country Examples:
![]()
💻 Tooling & Queries
To find administrative boundaries, you can use tools like Overpass Turbo. Here is a conceptual example of how you might query for a specific admin level:
[out:json][timeout:25];
relation["boundary"="administrative"]["admin_level"="2"];
out body;
>;
out skel qt;
Useful Tools:
taginfo: For global tag statistics.QLever/Sophox: For fast querying.Postpass: For database-level analysis.