Template:Inline coordinates

(Redirected from Template:Coor dms)


Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Inline coordinates/doc.

Purpose edit

{{Inline coordinates}} 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. However, it can also encode locations on natural satellites, dwarf planets, and planets other than Earth.

Features edit

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 (and locations on moon, mercury, venus, mars, and io), 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. Use {{Location}} for other work.

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)
  • Geo microformat.

Usage edit

{{inline coordinates|latitude|longitude|coordinate parameters|template parameters}}
{{inline coordinates|dd|N/S|dd|E/W|coordinate parameters|template parameters}}
{{inline coordinates|dd|mm|N/S|dd|mm|E/W|coordinate parameters|template parameters}}
{{inline coordinates|dd|mm|ss|N/S|dd|mm|ss|E/W|coordinate parameters|template parameters}}

There are two kinds of parameters, all optional:

  • Coordinate parameters are parameters that {{Inline coordinates}} 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 {{Inline coordinates}} template. These have format parameter=value and are separated from each other by the pipe character ( | ). The supported template parameters are format=, name=, and notes=.
  • 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 title (PAGENAME) is assumed.
Note: a name= parameter causes {{Inline coordinates}} to emit an hCard microformat 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.
  • label= specifies text for the link to be alternatively displayed instead of the coordinates. Do not use together with name!
  • notes= specifies text to be displayed immediately following the coordinates. This is primarily intended for adding footnotes to title coordinates.

Examples edit

{{Inline coordinates|43.651234|-79.383333}} 43°39′04″N 79°23′00″W / 43.651234°N 79.383333°W / 43.651234; -79.383333 Toronto – Fully decimal – N & W
{{Inline coordinates|43.65|-79.38}} 43°39′N 79°23′W / 43.65°N 79.38°W / 43.65; -79.38 Toronto – less precise
{{Inline coordinates|43.6500|-79.3800}} 43°39′00″N 79°22′48″W / 43.6500°N 79.3800°W / 43.6500; -79.3800 Toronto – medium precision with trailing zeroes
{{Inline coordinates|43.651234|N|79.383333|W}} 43°39′04″N 79°23′00″W / 43.651234°N 79.383333°W / 43.651234; -79.383333 Toronto – decimal with Northing & Westing
{{Inline coordinates|43|29|N|79|23|W}} 43°29′N 79°23′W / 43.483°N 79.383°W / 43.483; -79.383 Toronto – degrees & minutes
{{Inline coordinates|43|29|4|N|79|23|0|W}} 43°29′4″N 79°23′0″W / 43.48444°N 79.38333°W / 43.48444; -79.38333 Toronto – degrees, minutes & seconds
{{Inline coordinates|43|29|4.5|N|79|23|0.5|W}} 43°29′4.5″N 79°23′0.5″W / 43.484583°N 79.383472°W / 43.484583; -79.383472 Toronto – degrees, minutes, seconds & fractions of seconds
{{Inline coordinates|55.752222|N|37.615556|E}} 55°45′08″N 37°36′56″E / 55.752222°N 37.615556°E / 55.752222; 37.615556 Moscow – N & E
{{Inline coordinates|55.752222|N|37.615556|E|format=dms}} 55°45′08″N 37°36′56″E / 55.752222°N 37.615556°E / 55.752222; 37.615556 Convert to dms format
{{Inline coordinates|39.098095|-94.587307|format=dms}} 39°05′53″N 94°35′14″W / 39.098095°N 94.587307°W / 39.098095; -94.587307 Decimal conversion without N/S/E/W
{{Inline coordinates|55.752222|N|37.615556|E|format=dec|name=Moscow}} 55°45′08″N 37°36′56″E / 55.752222°N 37.615556°E / 55.752222; 37.615556 (Moscow) Convert to decimal and label on some maps
{{Inline coordinates|33|55|S|18|25|E}} 33°55′S 18°25′E / 33.917°S 18.417°E / -33.917; 18.417 Cape Town – S & E
{{Inline coordinates|35|00|N|105|00|E}} 35°00′N 105°00′E / 35°N 105°E / 35; 105 People's Republic of China
{{Inline coordinates|22|54|30|S|43|14|37|W}} 22°54′30″S 43°14′37″W / 22.9083°S 43.24361°W / -22.9083; -43.24361 Rio – S & W
{{Inline coordinates|22|S|43|W}} 22°S 43°W / 22°S 43°W / -22; -43 A degree confluence
{{Inline coordinates|52.516389|13.377778|label=Berlin, Brandenburg Gate}} 52°30′59″N 13°22′40″E / Berlin, Brandenburg Gate / 52.516389; 13.377778 another link text instead of coordinates for Brandenburg Gate;
first version decimal, second version dms
{{Inline coordinates|52|30|59|N|13|22|40|E|label=Brandenburg Gate in Berlin}} Brandenburg Gate in Berlin / 52.51639°N 13.3778°E / 52.51639; 13.3778
{{Inline coordinates|49°14′01.3″N 09°12′43.1″E}} 49°14′01″N 9°12′43″E / 49.23369°N 9.211982°E / 49.23369; 9.211982 DMS-syntax location won't work
{{Geolink|49°14′01.3″N 09°12′43.1″E}} 49.233 / 9.2119 Geolink can handle all input formats

References edit

Coordinate parameters edit

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.

type:T edit

{{Wikipedia:WikiProject Geographical coordinates/type:}}

scale:N edit

{{Wikipedia:WikiProject Geographical coordinates/scale:}}

dim:D edit

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 centimetres (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 kilometres (19 mi).

Samples
Subject View diameter Markup Result
Western Hemisphere 10,000 kilometres (6,200 mi) {{Inline coordinates|0|N|90|W|dim:10000km}} 0°N 90°W / 0°N 90°W / 0; -90
Ohio 400 kilometres (250 mi) {{Inline coordinates|40.5|-82.5|dim:400km}} 40°30′N 82°30′W / 40.5°N 82.5°W / 40.5; -82.5
Dresden 20,000 metres (12 mi) {{Inline coordinates|51.033|13.73|dim:20000}} 51°01′59″N 13°43′48″E / 51.033°N 13.73°E / 51.033; 13.73
Statue of Liberty 100 metres (330 ft) {{Inline coordinates|40.6892|-74.0445|dim:100}} 40°41′21″N 74°02′40″W / 40.6892°N 74.0445°W / 40.6892; -74.0445
region:R edit

{{Wikipedia:WikiProject Geographical coordinates/region:}}

globe:G edit

{{Wikipedia:WikiProject Geographical coordinates/globe:}}

source:S edit

Template:Coord-doc-source

Per-user display customization edit

Template:UF-coord-classes

Incorrect uses and maintenance category edit

The template has some input checks built in. Most errors display a bold, red message inline and categorize the article in the hidden maintenance category Coord template needing repair. There is/are currently 0 page(s) in that category. See the category description for further instructions.

A daily report of coordinates needing repair is at tools:~dispenser/view/File viewer#log:coord-commonswiki.log.

See also: en:WT:GEO#To do

Internals edit

See Template:Coord/doc/internals and Category:Coord template.

Class names edit

The class names geo, latitude and longitude are used to generate the microformat and MUST NOT be changed.