Key:capital
![]() |
| Description |
|---|
| The capital of a country or administrative divisions within countries |
| Rendering in OSM Carto |
| Group: places |
| Used on these elements |
| Documented values: 4 |
| Useful combination |
|
| See also |
| Status: de facto |
| Tools for this tag |
|
This property is used on place=city/town (and other place=* of type settlement) to tag the
capital of a country or administrative divisions within countries.
How to map
=yes- capital of a country
=<admin_level-number>for subdivisions of countries - seeboundary=administrative- e.g.
=4- capital of a state/province/...
- e.g.
Capitals not tagged as city or town
Not all country capitals fit into the definition of place=city/town because of size or of definition. Please join discussion on Talk page about tagging.
Ngerulmud - place=village4244310289
4244310289- This government complex is located 2 km from the center of the town of Melekeok, population 271. The largest town and former capital of Palau is 20 km away in Koror City, population ~11,200.
Funafuti - place=municipality3376265049
3376265049 and also place=atollon 447736425
447736425- The whole atoll is designated the capital, and currently this is mapped as a municipality rather than a specific settlement
Vatican City - place=suburb424311883
424311883- Since it it's a part of Rome and depending on it.
Retrieving capitals from boundary relations
Relations of type=boundary+boundary=administrative include the role . The role members can used to get the capitals of countries (
admin_centreadmin_level=2 on relation) and other capitals depending admin_level=* on relation.
The following Overpass API query (link) gets all national admin_centres of the world:
relation["admin_level"="2"]["type"="boundary"]["boundary"="administrative"]; node(r:"admin_centre"); out meta;
The following Overpass API query (link) gets all admin_level=4 admin_centres of Germany. The country and admin_level can be adjusted.
{{geocodeArea:Germany}}->.searchArea;
relation["admin_level"="4"]["type"="boundary"]["boundary"="administrative"];
node(r:"admin_centre");
node._(area.searchArea);
out meta;
As of 2016 the admin_centre role can't be used in databases created by osm2pgsql: We do not have this information in the database. osm2pgsql does not have membership information and nodes as relation members do not make it into geometries.
See also
- Proposed features/capital
- Tagging mailing list discussion October 2016
- Tagging mailing lists discussions in 2014:
External links
Maps where capitals are clearly visible:
