Template:Inline coordinates

From Wikimedia Commons, the free media repository
(Redirected fromTemplate:Coor dms)
Jump to navigation Jump to search


Template documentation[view·edit·history·purge]

Purpose

[edit]

{{Inline coordinates}}provides a standard notation for encoding locations by theirlatitudeandlongitudecoordinates. It is primarily for specifying theWGS84geographic coordinates of locations onEarth.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, theformat=parameter can be used to force display in a particular format.

The template displays the formatted coordinates with ahyperlinktoGeoHack.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 theWikiMiniAtlas(requiresJavaScript).

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 parametersare parameters that{{Inline coordinates}}passes to the map server. These have the formatparameter:valueand are separated from each other by the underscore character ( _ ). The supported coordinate parameters aredim:,globe:,region:,scale:,source:,andtype:.Seecoordinate parametersfor details and examples.
  • Template parametersare parameters used by the{{Inline coordinates}}template. These have formatparameter=valueand are separated from each other by the pipe character ( | ). The supported template parameters areformat=,name=,andnotes=.
  • format=can be used to forcedecordmscoordinate display.
  • format=decreformats the coordinates todecimal degreesformat.
  • format=dmsreformats the coordinates todegrees | minutes | secondsformat.
  • name=can be used to annotate inline coordinates for display in map services such as theWikiMiniAtlas.If omitted, the article title (PAGENAME) is assumed.
Note: aname=parameter causes{{Inline coordinates}}to emit anhCardmicroformat 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″N79°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′N79°23′W/ 43.65°N 79.38°W/43.65; -79.38 Toronto – less precise
{{Inline coordinates|43.6500|-79.3800}} 43°39′00″N79°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″N79°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′N79°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″N79°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″N79°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″N37°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″N37°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″N94°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″N37°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′S18°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′N105°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″S43°14′37″W/ 22.9083°S 43.24361°W/-22.9083; -43.24361 Rio – S & W
{{Inline coordinates|22|S|43|W}} 22°S43°W/ 22°S 43°W/-22; -43 Adegree confluence
{{Inline coordinates|52.516389|13.377778|label=Berlin, Brandenburg Gate}} 52°30′59″N13°22′40″E/ Berlin, Brandenburg Gate/52.516389; 13.377778 another link text instead of coordinates forBrandenburg 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″N9°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 Geolinkcan 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 helpGeoHackselect suitable map resources, and they will become more important whenWikimapsbecomes fully functional.

type:T
[edit]

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

scale:N
[edit]

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

dim:D
[edit]

Thedim:parameter defines thediameterof a viewing circle centered on the coordinate. While the default unit of measurement ismetres,thekmsuffix may be appended to indicatekilometres.

GeoHackusesdim:to select amap scalesuch that the viewing circle appears roughly 10 centimetres (4 in) in diameter on a 72dpicomputer monitor. If nodim:,type:,orscale: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°N90°W/ 0°N 90°W/0; -90
Ohio 400 kilometres (250 mi) {{Inline coordinates|40.5|-82.5|dim:400km}} 40°30′N82°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″N13°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″N74°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 abold, redmessage inline and categorize the article in thehiddenmaintenance categoryCoord template needing repair.There is/are currently0page(s) in that category. See the category description for further instructions.

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

See also:en:WT:GEO#To do

Internals

[edit]

SeeTemplate:Coord/doc/internalsandCategory:Coord template.

Class names

[edit]

The class namesgeo,latitudeandlongitudeare used to generate the microformat andMUST NOTbe changed.