Wikipedia:How to add geocodes to articles
This is a short guide to adding geographic coordinate tags to Wikipedia articles.
Why geocode articles?[edit]
By adding coordinates, a Wikipedia reader can easily view the location on a street map, nautical chart, topographic map, by satellite photo, realtime weather map, and many other options. Coordinate data makes an article eventually appear in various services such as Google Maps Wikipedia overlay, Google Earth, Copernix.io and Wikimedia's map service. Coordinate data also helps readers looking for geographically based data, such as locations near a reference point, or related information. For example, this link from Mount Hood simultaneously shows the location of the summit and of all its glaciers.
How to tag an article[edit]
For most geographically based articles lacking a coordinate, a {{coord missing}} tag was added to the article's source wikitext just below the External Links section. Replace it with {{coord|latitude|longitude|display=title}}
suitably customized. Once the coordinate data is added, the article displays a mapping link at the top right, alongside the article title. Anyone can then access map resources using that link.
To add 57°18′22″N 4°27′32″W / 57.30611°N 4.45889°W to the top of an article, use {{Coord}}, thus:
{{Coord|57|18|22|N|4|27|32|W|display=title}}
These coordinates are in degrees, minutes, and seconds of arc.
"title" means that the coordinates will be displayed next to the article's title at the top of the page (in desktop view only; title coordinates do not display in mobile view) and before any other text or images. It also records the coordinates as the primary location of the page's subject in Wikipedia's geosearch API.
To add 44°06′45″N 87°54′47″W / 44.1124°N 87.9130°W to the top of an article, use either
{{Coord|44.1124|N|87.9130|W|display=title}}
(which does not require minutes or seconds but does require the user to specify north/ south and east/west) or
{{Coord|44.1124|-87.9130|display=title}}
(in which the north and east are presumed by positive values while the south and west are negative ones). These coordinates are in decimal degrees.
- Degrees, minutes and seconds, when used, must each be separated by a pipe ("|").
- Map datum must be WGS84 if possible (except for off-Earth bodies).
- Avoid excessive precision (0.0001° is <11 m, 1″ is <31 m).
- Maintain consistency of decimal places or minutes/seconds between latitude and longitude.
- Latitude (N/S) must appear before longitude (E/W).
Optional coordinate parameters follow the longitude and are separated by an underscore ("_"):
- dim:
dim:
N (viewing diameter in metres) - region:
region:
R (ISO 3166-1 alpha-2 or ISO 3166-2 code) - type:
type:
T (landmark
orcity(30,000)
, for example)
Other optional parameters are separated by a pipe ("|"):
- display
|display=inline
(the default) to display in the body of the article only,|display=title
to display at the top of the article only (in desktop view only; title coordinates do not display in mobile view), or|display=inline,title
to display in both places.
- name
name=
X to label the place on maps (default is PAGENAME)
Thus: {{Coord|44.1172|-87.9135|dim:30_region:US-WI_type:event
|display=inline,title|name=accident site}}
Use |display=title
(or |display=inline,title
) once per article, for the subject of the article, where appropriate.
- Per WP:ORDER, the template is placed in articles after any navigation templates, but before all categories, including the {{DEFAULTSORT}} template. This template may also be placed within an infobox, instead of at the bottom of an article.
- For full details, refer to {{Coord/doc}}.
- Additional guidance is available at obtaining coordinates and converting coordinates.
- For a village, use the centre of the current village, where this is difficult choose the earliest known settlement of that name, or the central post office if all else fails.
- For large military and industrial establishments (castles, barracks, dockyards, car plants) use the main gate, or if that cannot be found, the approximate centre of the establishment. See here for further help
- For administrative districts, use the location of the head office, or if that cannot be found, the approximate centre of the district.
Linear features[edit]
The possible methods of tagging linear features (rivers, roads, tunnels, etc.) are being discussed at Wikipedia:WikiProject Geographical coordinates/Linear in order to formulate a policy. Please contribute!
How to determine geographical coordinates[edit]
You can find a list of ways to get geographical coordinates at Wikipedia:Obtaining geographic coordinates.
Note that regardless of the source of coordinates, it is good practice to evaluate whether they appear reasonable at first glance. In particular, more than one place in a country may have the same name; in which case, you should very carefully check which place is meant—or if you are unsure—leave the article for someone with local knowledge to tag later.
Please don't be overly precise, but do ensure that the single point that the chosen pair of coordinates represents does fall on or within the feature.
How to find more articles to tag[edit]
You may already have had a list of articles missing coordinates posted in the message to your WikiProject. If so, please remove articles from that list when you're done with them. This will help other editors by eliminating duplication of effort.
Alternatively, up-to-date lists of articles on articles missing coordinates for most countries are in the subcategories of Category:Articles missing geocoordinate data by country.
More advanced users may want to use Wikipedia:CatScan to intersect one of the sub-categories of Category:Articles missing geocoordinate data by country with other, subject-specific categories to provide up-to-date lists of eligible articles for particular subjects. For example, this CatScan finds articles missing coordinate data related to the U.S. state of Oregon. Use that as a starting place.
When an article should not be tagged[edit]
The lists of articles for tagging are generated automatically by a bot. Although we've tried our best to eliminate errors, occasional articles may have been listed by the bot that cannot or should not be geocoded. The tag is usually placed nearly at the bottom of the wikitext, below External links and above the category and stub tags.
When this is the case, simply remove the {{coord missing}} tag from the article, and this will remove the article from future requests.
Further information[edit]
To learn more about geographic coordinates on Wikipedia, please visit Wikipedia:WikiProject Geographical coordinates - and feel free to sign up!