Template:CoordDMS/doc: Difference between revisions
meta>Salix alba ←Created page with '{{Documentation subpage}} <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> A version of the {{t1|coord}} template where degrees,...' |
meta>Salix alba tidy |
||
Line 6: | Line 6: | ||
== Usage == | == Usage == | ||
To add {{CoordDMS|57|18|22|N|4|27|32|W}} to the top of an article, use {{Tl| | To add {{CoordDMS|57|18|22|N|4|27|32|W}} to the top of an article, use {{Tl|CoordDMS}}, thus: | ||
:'''<code><nowiki>{{CoordDMS|57|18|22|N|4|27|32|W|display=title}}</nowiki></code>''' | :'''<code><nowiki>{{CoordDMS|57|18|22|N|4|27|32|W|display=title}}</nowiki></code>''' | ||
Line 42: | Line 42: | ||
===Template Data=== | ===Template Data=== | ||
<templatedata>{ | <templatedata>{ | ||
"description": "Encodes the latitude and longitude coordinates of a location, provides a link to map of the location.", | "description": "Encodes the latitude and longitude coordinates of a location as degrees, minutes and seconds. Displays the coordinates and provides a link to map of the location.", | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": "Latitude degrees", | "label": "Latitude degrees", | ||
"description": "The degrees part of the latitude | "description": "The degrees part of the latitude, a positive whole number.", | ||
"type": "number", | "type": "number", | ||
"required": true | "required": true | ||
Line 52: | Line 52: | ||
"2": { | "2": { | ||
"label": "Latitude minutes", | "label": "Latitude minutes", | ||
"description": "The minutes part of the latitude. Do not be overly precise, 1' is approximately 1.5km | "description": "The minutes part of the latitude. Do not be overly precise, 1' is approximately 1.5km.", | ||
"type": "number", | "type": "number", | ||
"required": true | "required": true | ||
Line 58: | Line 58: | ||
"3": { | "3": { | ||
"label": "Latitude seconds", | "label": "Latitude seconds", | ||
"description": "The minutes part of the latitude. Do not be overly precise, 1\" is approximately 30m | "description": "The minutes part of the latitude. Do not be overly precise, 1\" is approximately 30m.", | ||
"type": "number", | "type": "number", | ||
"required": true | "required": true | ||
Line 64: | Line 64: | ||
"4": { | "4": { | ||
"label": "Latitude direction", | "label": "Latitude direction", | ||
"description": "Direction part of latitude: N or S | "description": "Direction part of latitude: N or S.", | ||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
Line 70: | Line 70: | ||
"5": { | "5": { | ||
"label": "Longitude degrees", | "label": "Longitude degrees", | ||
"description": "The degrees part of the longitude | "description": "The degrees part of the longitude, a positive whole number.", | ||
"type": "number", | "type": "number", | ||
"required": true | "required": true | ||
Line 76: | Line 76: | ||
"6": { | "6": { | ||
"label": "Longitude minutes", | "label": "Longitude minutes", | ||
"description": "The minutes part of the longitude. Do not be overly precise 1' is approximately 1.5km | "description": "The minutes part of the longitude. Do not be overly precise 1' is approximately 1.5km.", | ||
"type": "number", | "type": "number", | ||
"required": true | "required": true | ||
Line 82: | Line 82: | ||
"7": { | "7": { | ||
"label": "Longitude seconds", | "label": "Longitude seconds", | ||
"description": "The minutes part of the longitude. Do not be overly precise 1\" is approximately 30m | "description": "The minutes part of the longitude. Do not be overly precise 1\" is approximately 30m.", | ||
"type": "number", | "type": "number", | ||
"required": true | "required": true | ||
Line 88: | Line 88: | ||
"8": { | "8": { | ||
"label": "Longitude direction", | "label": "Longitude direction", | ||
"description": "Direction part of longitude: E or W | "description": "Direction part of longitude: E or W.", | ||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
Line 126: | Line 126: | ||
== See also == | == See also == | ||
*{{t1|coord}} the base template has more details on some of the parameters | |||
*{{t1|coordDec}} an alternative version where signed decimal degrees are specified | |||
*{{t1|coordDM}} an alternative version just degrees and minutes are specified | |||
<includeonly> | <includeonly> | ||
<!-- Categories go here, and interwikis go in Wikidata --> | <!-- Categories go here, and interwikis go in Wikidata --> | ||
[[Category:Coordinates templates]] | |||
</includeonly> | </includeonly> |
Revision as of 23:49, 15 July 2013
This is a documentation subpage for Template:CoordDMS. It may contain usage information, categories and other content that is not part of the original template page. |
A version of the Template:T1 template where degrees, minutes and seconds are specified.
Usage
To add Lua error: callParserFunction: function "#coordinates" was not found.{{#coordinates:57|18|22|N|4|27|32|W|dim=|globe=|scale=|region=|type= | |name= }} to the top of an article, use {{CoordDMS}}, thus:
{{CoordDMS|57|18|22|N|4|27|32|W|display=title}}
No alternate set of parameter are available for this template. See {{coordDec}} for angles specified as signed decimal degrees, and {{coordDM}} for when just degrees and minutes are specified.
These coordinates are in degrees, minutes, and seconds of arc.
- Degrees, minutes and seconds must be separated by a pipe ("|").
- Map datum must be WGS84 (except for off-earth bodies).
- Avoid excessive precision (0.0001° is <11 m, 1″ is <31 m).
- 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, or|display=inline,title
to display in both places.
- name
name=
X to label the place on maps (default is PAGENAME)
Thus: {{CoordDMS|57|18|22|N|4|27|32|W|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 any Persondata or Defaultsort templates, or Categories.
- For full details, refer to {{Coord/doc}}.
- Additional guidance is available: obtaining coordinates, converting coordinates
Template Data
Encodes the latitude and longitude coordinates of a location as degrees, minutes and seconds. Displays the coordinates and provides a link to map of the location.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Latitude degrees | 1 | The degrees part of the latitude, a positive whole number. | Number | required |
Latitude minutes | 2 | The minutes part of the latitude. Do not be overly precise, 1' is approximately 1.5km. | Number | required |
Latitude seconds | 3 | The minutes part of the latitude. Do not be overly precise, 1" is approximately 30m. | Number | required |
Latitude direction | 4 | Direction part of latitude: N or S. | String | required |
Longitude degrees | 5 | The degrees part of the longitude, a positive whole number. | Number | required |
Longitude minutes | 6 | The minutes part of the longitude. Do not be overly precise 1' is approximately 1.5km. | Number | required |
Longitude seconds | 7 | The minutes part of the longitude. Do not be overly precise 1" is approximately 30m. | Number | required |
Longitude direction | 8 | Direction part of longitude: E or W. | String | required |
Coordinate parameters | 9 | Optional parameters separated by an underscore '_', dim:N (viewing diameter in metres), region:R (ISO 3166-1 alpha-2 or ISO 3166-2 code), type:T (eg landmark or city(30,000)). For example 'dim:30_region:US-WI_type:event' | String | optional |
Display | display | Where it is displayed. Can be one of: 'inline' in the body of the article (default), 'title' at the top of the article or 'inline,title' both | String | optional |
Name | name | a label to place on maps (default is PAGENAME) | String | optional |
Notes | notes | text displayed immediately following the coordinates | String | optional |
Format | format | How the coordinates are displayed, either 'dec' or 'dms' | String | optional |
See also
- Template:T1 the base template has more details on some of the parameters
- Template:T1 an alternative version where signed decimal degrees are specified
- Template:T1 an alternative version just degrees and minutes are specified