This template is used on ១២៧០០០០+ pages, or roughly 3521% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.
{{Coord}} provides a standard notation for encoding locations by their latitude and longitude coordinates. It is primarily for specifying the WGS84 geographic coordinates of locations on Earth, at the same time emitting a machine-readable Geo microformat. However, it can also encode locations on natural satellites, dwarf planets, and planets other than Earth.
To specify celestial coordinates, use {{Sky}} instead.
Tag articles which lack coordinates (but need them) with {{Coord missing}}.
If the subject's location is truly unknown or disputed, note this with {{coord unknown}}.
Latitude and longitude may be specified (with appropriate precision) either in decimal notation or as degrees/minutes/seconds. By default, coordinates appear in the format used to specify them. However, the format= parameter can be used to force display in a particular format.
The template displays the formatted coordinates with a hyperlink to GeoHack. GeoHack displays information customized to the location, including links to external mapping services.
For terrestrial locations, a blue globe () appears to the left of the hyperlink. Clicking on the globe activates the WikiMiniAtlas (requires JavaScript).
By default, coordinates appear "in line" with the adjacent text. However, the display= parameter can be used to move the coordinates up near the page title—or display them in both places at once.
The template outputs coordinates in three formats:
Degree/minutes/seconds ("DMS", precision is degrees, or degrees/minutes, or degrees/minutes/seconds, based on input precision).
Decimal degrees (varying the number of decimal places based on input precision)
Logged-in users can customize how coordinates appear in their browsers.
Caveats
The template must not be modified without prior discussion.
Tools which read Wikipedia database dumps (such as Google Earth) often ignore inline coordinates. To ensure that coordinates are seen by these tools, one set should be displayed beside the title. See How do I get my Wikipedia article to show up in the Google Earth Geographic Web layer?. However, if multiple title coordinates appear on a single page, they will overlap, making them illegible.
Superseded templates
This single template supersedes {{coor d}}, (and others in that family which have since been redirected to it), plus the Geolinks and Mapit templates. Most parameters can be used as before – see Usage.
The hemisphere identifiers (N/S) and (E/W), if used, must be adjacent to the enclosing pipe "|" characters, and cannot be preceded or succeeded by spaces.
There are two kinds of parameters, all optional:
Coordinate parameters are parameters that {{Coord}} passes to the map server. These have the format parameter:value and are separated from each other by the underscore character ( _ ). The supported coordinate parameters are dim:, globe:, region:, scale:, source:, and type:. See coordinate parameters for details and examples.
Template parameters are parameters used by the {{Coord}} template. These have format parameter=value and are separated from each other by the pipe character ( | ). The supported template parameters are display=, format=, name=, and notes=.
display= can be one of the following:
display=inline – Display the coordinate inline (default)
display=title – Display the coordinate at the top of the article, beside the article's title (replaces {{coor title dms}} family)
shortcut: display=t
display=inline,title – Display the coordinate both inline and beside the article's title (replaces {{coor at dms}} family)
shortcut: display=it
display=title,inline has the same effect as display=inline,title
Note: the title attribute indicates that the coordinates apply to the entire article, and not just one of (perhaps many) places mentioned in it — so it should only be omitted in the latter case.
format= can be used to force dec or dms coordinate display.
format=dec reformats the coordinates to decimal degrees format.
format=dms reformats the coordinates to degrees | minutes | seconds format.
name= can be used to annotate inline coordinates for display in map services such as the WikiMiniAtlas. If omitted, the article's title (PAGENAME) is assumed.
Note: a name= parameter causes {{Coord}} to emit an hCardmicroformat using that name, even if used within an existing hCard. Do not use when the name is that of a person (e.g for a gravesite), as the generated hCard would be invalid. Also, do not use square brackets in names.
notes= specifies text to be displayed immediately following the coordinates. This is primarily intended for adding footnotes to coordinates displayed beside the title.
Displaying all coordinate links on one map
The template {{GeoGroup}} can be used in an article with coordinates. This template creates links to Google Maps and Bing which display all the coordinates on a single map, and links to other services which allow the coordinates to be used or downloaded in a variety of formats.
The first unnamed parameter following the longitude is an optional string of coordinate parameters, separated by underscores. These parameters help GeoHack select suitable map resources, and they will become more important when Wikimaps becomes fully functional.
The dim: parameter defines the diameter of a viewing circle centered on the coordinate. While the default unit of measurement is metres, the km suffix may be appended to indicate kilometres.
GeoHack uses dim: to select a map scale such that the viewing circle appears roughly 10 centiម៉ែត្រs (4 in) in diameter on a 72 dpi computer monitor. If no dim:, type:, or scale: parameters are provided, GeoHack uses its default viewing circle of 30 kiloម៉ែត្រs (19 mi).
Specifies, where present, the data source and data source format/datum, and optionally the original data, presented in parentheses. This is initially primarily intended for use by geotagging robots, so that data is not blindly repeatedly copied from format to format and Wikipedia to Wikipedia, with progressive loss of precision and attributability.
Examples:
A lat/long geotag derived from a Ordnance SurveyNational Grid Reference NM 435 355 found in the English-language Wikipedia would be tagged as "source:enwiki-osgb36(NM435355)"
A latitude-longitude location sourced from data taken from the German-language Wikipedia would be tagged as "source:dewiki" – and so on, for other language codes;
A location sourced from the public domain GeoNet Names Server database would be tagged as "source:GNS". No datum or format information is needed, since by default all Wikipedia coordinates are in latitude/longitude format based on the WGS84 datum. Similarly, US locations sourced from the similar public domain GNIS database would be tagged as "source:GNIS".
Per-user display customization
To always display coordinates as DMS values, add this to your common.css:
If CSS is disabled, or you have an old copy of MediaWiki:Common.css cached, you will see both formats. (You can either clear your cache or manually refresh this URL: [១].)
To disable display of the blue globe adjacent to coordinates, add this to your common.js
The template has some input checks built in. Most errors display a bold, red message inline and categorize the article in the hiddenmaintenance categoryPages with malformed coordinate tags. There are currently ១០ pages in that category. See the category description for further instructions.
The following templates are "subroutines" of {{Coord}}. Separating them out drastically reduces the pre-expand size of {{Coord}}. They shouldn't be invoked directly.