Template:Coord: Difference between revisions
(Created page with "<includeonly>{{#invoke:Coordinates|coord}}</includeonly><noinclude> </noinclude>") Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
<includeonly>{{#invoke:Coordinates|coord}}</includeonly><noinclude> | <includeonly>{{#invoke:Coordinates|coord}}</includeonly><noinclude> | ||
== Examples == | |||
{{for|the guideline on coordinate precision|WP:OPCOORD}} | |||
{| class="wikitable" | |||
| <code><nowiki>{{coord|43.651234|-79.383333}}</nowiki></code> | |||
| {{coord|43.651234|-79.383333}} | |||
| Toronto – Fully decimal – western hemisphere implied by negation | |||
|- | |||
| <code><nowiki>{{coord|43.65|-79.38}}</nowiki></code> | |||
| {{coord|43.65|-79.38}} | |||
| Toronto – low precision decimal | |||
|- | |||
| <code><nowiki>{{coord|43.6500|-79.3800}}</nowiki></code> | |||
| {{coord|43.6500|-79.3800}} | |||
| Toronto – medium precision decimal with trailing zeroes | |||
|- | |||
| <code><nowiki>{{coord|43.653500|N|79.384000|W}}</nowiki></code> | |||
| {{coord|43.653500|N|79.384000|W}} | |||
| Toronto – high precision decimal with explicit hemisphere notation | |||
|- | |||
| <code><nowiki>{{coord|43|29|N|79|23|W}}</nowiki></code> | |||
| {{coord|43|29|N|79|23|W}} | |||
| Toronto – degrees & minutes | |||
|- | |||
| <code><nowiki>{{coord|43|29|13|N|79|23|02|W}}</nowiki></code> | |||
| {{coord|43|29|4|N|79|23|0|W}} | |||
| Toronto – degrees, minutes & seconds | |||
|- | |||
| <code><nowiki>{{coord|43|29|12.6|N|79|23|02.4|W}}</nowiki></code> | |||
| {{coord|43|29|12.6|N|79|23|02.4|W}} | |||
| Toronto – degrees, minutes, seconds & fractions of seconds | |||
|- | |||
| <code><nowiki>{{coord|55.752222|N|37.615556|E}}</nowiki></code> | |||
| {{coord|55.752222|N|37.615556|E}} | |||
| Moscow – N & E | |||
|- | |||
| <code><nowiki>{{coord|55.752222|N|37.615556|E|format=dms}}</nowiki></code> | |||
| {{coord|55.752222|N|37.615556|E|format=dms}} | |||
| Convert to dms format | |||
|- | |||
| <code><nowiki>{{coord|39.098095|-94.587307|format=dms}}</nowiki></code> | |||
| {{coord|39.098095|-94.587307|format=dms}} | |||
| Decimal conversion without N/S/E/W | |||
|- | |||
| <code><nowiki>{{coord|55.752222|N|37.615556|E|format=dec|name=Moscow}}</nowiki></code> | |||
| {{coord|55.752222|N|37.615556|E|format=dec|name=Moscow}} | |||
| Convert to decimal and label on some maps | |||
|- | |||
| <code><nowiki>{{coord|33|55|S|18|25|E}}</nowiki></code> | |||
| {{coord|33|55|S|18|25|E}} | |||
| Cape Town – S & E | |||
|- | |||
| <code><nowiki>{{coord|35|00|N|105|00|E}}</nowiki></code> | |||
| {{coord|35|00|N|105|00|E}} | |||
| People's Republic of China | |||
|- | |||
| <code><nowiki>{{coord|22|54|30|S|43|14|37|W}}</nowiki></code> | |||
| {{coord|22|54|30|S|43|14|37|W}} | |||
| Rio – S & W | |||
|- | |||
| <code><nowiki>{{coord|22|S|43|W}}</nowiki></code> | |||
| {{coord|22|S|43|W}} | |||
| A [[Degree Confluence Project|degree confluence]]. | |||
|- | |||
| <code><nowiki>{{coord|52|28|N|1|55|W|region:GB_type:city|notes=<ref>{{cite web|url=http://www.fallingrain.com/world/UK/0/Birmingham.html|title=Birmingham}}</ref>|display=inline,title}}</nowiki></code> | |||
| {{coord|52|28|N|1|55|W|region:GB_type:city|notes=<ref>{{cite web|url=http://www.fallingrain.com/world/UK/0/Birmingham.html|title=Birmingham}}</ref>|display=inline,title}} | |||
| Birmingham – with display, notes, and parameter settings; note that these coordinates are also displayed at the top of this page. | |||
|- | |||
| <code><nowiki>{{coord|51|25.813|N|0|43.945|E}}</nowiki></code> | |||
| {{coord|51|25.813|N|0|43.945|E}} | |||
| Navigation buoy in the River Medway, England. | |||
|- | |||
| <code><nowiki>{{coord|51|36.287|N|8|32.018|W}}</nowiki></code> | |||
| {{coord|51|36.287|N|8|32.018|W}} | |||
| Lighthouse at the [[Old Head of Kinsale]] as defined by the [[Commissioners of Irish Lights]]. | |||
|} | |||
<templatedata>{ | |||
"description": "Encodes the latitude and longitude coordinates of a location, provides a link to map of the location. This template does not work well with the Visual Editor, consider using {{coordDec}} for signed decimal degrees, {{coordDMS}} when degrees minutes and seconds are specified {{coordDM}} when only degrees and minutes are specified. To use this template you will need to use positional parameter following one of these schemes: {{coord | D | M | S | NS | D | M | S | EW | geo | opts}}, {{coord | D | M | NS | D | M | EW | geo | opts}}, {{coord | D| NS | D| EW | geo | opts}} {{coord | sD | sD | geo | opts}} where D is degrees, M is minutes, S seconds, sD signed decimal degrees, NS is N or S, EW is E or W, opts are named parameter and geo are the coordinate parameters described on the main doc page.", | |||
"params": { | |||
"1": { | |||
"label": "1", | |||
"description": "Either degrees latitude or a signed decimal degrees latitude", | |||
"type": "number", | |||
"required": false, | |||
"suggested": true | |||
}, | |||
"2": { | |||
"label": "2", | |||
"description": "Either: minutes latitude, signed decimal degrees longitude or 'N' or 'S'.", | |||
"type": "string", | |||
"required": false, | |||
"suggested": true | |||
}, | |||
"3": { | |||
"label": "3", | |||
"description": "Either: second latitude, degrees longitude, 'N' or 'S' or GeoHack parameters", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"4": { | |||
"label": "4", | |||
"description": "Either: degrees longitude, 'N', 'S', 'E' or 'W' or GeoHack parameters", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"5": { | |||
"label": "5", | |||
"description": "Either: degrees longitude, minutes longitude or GeoHack parameters", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"6": { | |||
"label": "6", | |||
"description": "Either: minutes longitude, 'E' or 'W' or GeoHack parameters", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"7": { | |||
"label": "7", | |||
"description": "Either second longitude, or GeoHack parameters", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"8": { | |||
"label": "8", | |||
"description": "'E' or 'W'.", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"9": { | |||
"label": "9", | |||
"description": "GeoHack parameters. Example: dim:30_region:US-WI_type:event", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"qid": { | |||
"label": "Wikidata item", | |||
"description": "Retrieve coordinates from a WikiData entry instead of from this template's parameters", | |||
"type": "line", | |||
"required": false, | |||
"example": "Q513" | |||
}, | |||
"display": { | |||
"label": "Display", | |||
"description": "Where it is displayed. Can be one of: 'inline' in the body of the article, 'title' at the top of the article or 'inline,title' both", | |||
"type": "line", | |||
"default": "inline", | |||
"suggested": true, | |||
"required": false, | |||
"suggestedvalues": [ | |||
"inline", | |||
"title", | |||
"inline,title" | |||
] | |||
}, | |||
"name": { | |||
"label": "Name", | |||
"description": "a label to place on maps (default is PAGENAME)", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"notes": { | |||
"label": "Notes", | |||
"description": "text displayed immediately following the coordinates", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"format": { | |||
"label": "Format", | |||
"description": "How the coordinates are displayed, either 'dec' or 'dms'", | |||
"type": "line", | |||
"required": false, | |||
"suggestedvalues": [ | |||
"dec", | |||
"dms" | |||
] | |||
}, | |||
"nosave": { | |||
"label": "Geosearch", | |||
"description": "Set to 'true' if you want to avoid this coordinate to be registered in the geosearch API.", | |||
"type": "string", | |||
"required": false | |||
} | |||
} | |||
}</templatedata> | |||
</noinclude> | </noinclude> |
Revision as of 04:25, 31 May 2023
Examples
{{coord|43.651234|-79.383333}}
|
43°39′04″N 79°23′00″W / 43.651234°N 79.383333°W ⧼validator-fatal-error⧽ |
Toronto – Fully decimal – western hemisphere implied by negation |
{{coord|43.65|-79.38}}
|
43°39′N 79°23′W / 43.65°N 79.38°W ⧼validator-fatal-error⧽ |
Toronto – low precision decimal |
{{coord|43.6500|-79.3800}}
|
43°39′00″N 79°22′48″W / 43.6500°N 79.3800°W ⧼validator-fatal-error⧽ |
Toronto – medium precision decimal with trailing zeroes |
{{coord|43.653500|N|79.384000|W}}
|
43°39′13″N 79°23′02″W / 43.653500°N 79.384000°W ⧼validator-fatal-error⧽ |
Toronto – high precision decimal with explicit hemisphere notation |
{{coord|43|29|N|79|23|W}}
|
43°29′N 79°23′W / 43.483°N 79.383°W ⧼validator-fatal-error⧽ |
Toronto – degrees & minutes |
{{coord|43|29|13|N|79|23|02|W}}
|
43°29′4″N 79°23′0″W / 43.48444°N 79.38333°W ⧼validator-fatal-error⧽ |
Toronto – degrees, minutes & seconds |
{{coord|43|29|12.6|N|79|23|02.4|W}}
|
43°29′12.6″N 79°23′02.4″W / 43.486833°N 79.384000°W ⧼validator-fatal-error⧽ |
Toronto – degrees, minutes, seconds & fractions of seconds |
{{coord|55.752222|N|37.615556|E}}
|
55°45′08″N 37°36′56″E / 55.752222°N 37.615556°E ⧼validator-fatal-error⧽ |
Moscow – N & E |
{{coord|55.752222|N|37.615556|E|format=dms}}
|
55°45′08″N 37°36′56″E / 55.752222°N 37.615556°E ⧼validator-fatal-error⧽ |
Convert to dms format |
{{coord|39.098095|-94.587307|format=dms}}
|
39°05′53″N 94°35′14″W / 39.098095°N 94.587307°W ⧼validator-fatal-error⧽ |
Decimal conversion without N/S/E/W |
{{coord|55.752222|N|37.615556|E|format=dec|name=Moscow}}
|
55°45′08″N 37°36′56″E / 55.752222°N 37.615556°E ⧼validator-fatal-error⧽ |
Convert to decimal and label on some maps |
{{coord|33|55|S|18|25|E}}
|
33°55′S 18°25′E / 33.917°S 18.417°E ⧼validator-fatal-error⧽ |
Cape Town – S & E |
{{coord|35|00|N|105|00|E}}
|
35°00′N 105°00′E / 35.000°N 105.000°E ⧼validator-fatal-error⧽ |
People's Republic of China |
{{coord|22|54|30|S|43|14|37|W}}
|
22°54′30″S 43°14′37″W / 22.90833°S 43.24361°W ⧼validator-fatal-error⧽ |
Rio – S & W |
{{coord|22|S|43|W}}
|
22°S 43°W / 22°S 43°W ⧼validator-fatal-error⧽ |
A degree confluence. |
{{coord|52|28|N|1|55|W|region:GB_type:city|notes=<ref>{{cite web|url=http://www.fallingrain.com/world/UK/0/Birmingham.html|title=Birmingham}}</ref>|display=inline,title}}
|
Lua error in Module:Coordinates at line 489: attempt to index field 'wikibase' (a nil value). | Birmingham – with display, notes, and parameter settings; note that these coordinates are also displayed at the top of this page. |
{{coord|51|25.813|N|0|43.945|E}}
|
51°25.813′N 0°43.945′E / 51.430217°N 0.732417°E ⧼validator-fatal-error⧽ |
Navigation buoy in the River Medway, England. |
{{coord|51|36.287|N|8|32.018|W}}
|
51°36.287′N 8°32.018′W / 51.604783°N 8.533633°W ⧼validator-fatal-error⧽ |
Lighthouse at the Old Head of Kinsale as defined by the Commissioners of Irish Lights. |
Encodes the latitude and longitude coordinates of a location, provides a link to map of the location. This template does not work well with the Visual Editor, consider using {{coordDec}} for signed decimal degrees, {{coordDMS}} when degrees minutes and seconds are specified {{coordDM}} when only degrees and minutes are specified. To use this template you will need to use positional parameter following one of these schemes: {{coord | D | M | S | NS | D | M | S | EW | geo | opts}}, {{coord | D | M | NS | D | M | EW | geo | opts}}, {{coord | D| NS | D| EW | geo | opts}} {{coord | sD | sD | geo | opts}} where D is degrees, M is minutes, S seconds, sD signed decimal degrees, NS is N or S, EW is E or W, opts are named parameter and geo are the coordinate parameters described on the main doc page.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | Either degrees latitude or a signed decimal degrees latitude | Number | suggested |
2 | 2 | Either: minutes latitude, signed decimal degrees longitude or 'N' or 'S'. | String | suggested |
3 | 3 | Either: second latitude, degrees longitude, 'N' or 'S' or GeoHack parameters | String | optional |
4 | 4 | Either: degrees longitude, 'N', 'S', 'E' or 'W' or GeoHack parameters | String | optional |
5 | 5 | Either: degrees longitude, minutes longitude or GeoHack parameters | String | optional |
6 | 6 | Either: minutes longitude, 'E' or 'W' or GeoHack parameters | String | optional |
7 | 7 | Either second longitude, or GeoHack parameters | String | optional |
8 | 8 | 'E' or 'W'. | String | optional |
9 | 9 | GeoHack parameters. Example: dim:30_region:US-WI_type:event | String | optional |
Wikidata item | qid | Retrieve coordinates from a WikiData entry instead of from this template's parameters
| Line | optional |
Display | display | Where it is displayed. Can be one of: 'inline' in the body of the article, 'title' at the top of the article or 'inline,title' both
| Line | suggested |
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'
| Line | optional |
Geosearch | nosave | Set to 'true' if you want to avoid this coordinate to be registered in the geosearch API. | String | optional |