Template:CoordDMS/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Salix alba
update doc
Ookami (talk | contribs)
m 11 revisions imported
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{lua|Module:Coordinates|Module:String}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->


A version of the {{t1|coord}} template where degrees, minutes and seconds are specified.
A version of the {{tl|Coord}} template where degrees, minutes and seconds are specified.


== Usage ==
== Usage ==
 
To add {{CoordDMS|57|18|22|N|4|27|32|W}} to the top of an article, use {{tl|CoordDMS}}, thus:
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>'''


No alternate set of parameter are available for this template. See {{tl|coordDec}} for angles specified as signed decimal degrees, and {{tl|coordDM}} for when just degrees and minutes are specified.
No alternate set of parameter are available for this template. See {{tl|CoordDec}} for angles specified as signed decimal degrees, and {{tl|CoordDM}} for when just degrees and minutes are specified.


These [[Geographic coordinate system|coordinates]] are in [[Degree (angle)|degrees]], [[Minute of arc|minutes]], and seconds of arc.
These [[Geographic coordinate system|coordinates]] are in [[Degree (angle)|degrees]], [[Minute of arc|minutes]], and seconds of arc.
Line 18: Line 18:
* Latitude (N/S) must appear before longitude (E/W).
* Latitude (N/S) must appear before longitude (E/W).


Optional parameters the are all named parameters in the form <code>name=value</code>
Optional parameters are all named parameters in the form <code>name=value</code>
*'''display'''
* '''display'''
*: {{Para|display|inline}} (the default) to display in the body of the article only,
*: {{Para|display|inline}} (the default) to display in the body of the article only,
*: {{Para|display|title}} to display at the top of the article only, or
*: {{Para|display|title}} to display at the top of the article only, or
*: {{Para|display|inline,title}} to display in both places.
*: {{Para|display|inline,title}} to display in both places.
*'''name'''
* '''name'''
*: {{Para|name|X}} to label the place on maps (default is [[mw:Help:Magic words#Page names|PAGENAME]])
*: {{Para|name|X}} to label the place on maps (default is [[mw:Help:Magic words#Page names|PAGENAME]])
*'''Notes'''
* '''notes'''
*: {{Para|notes}} text displayed immediately following the coordinates,
*: {{Para|notes}} text displayed immediately following the coordinates,
*'''format''' How the coordinates are displayed
* '''format''' How the coordinates are displayed
*:{{Para|format|dec}} decimal format
*: {{Para|format|dec}} decimal format
*:{{Para|format|dms}} degrees minutes and seconds format
*: {{Para|format|dms}} degrees minutes and seconds format


Optional geodata coordinates parameters, the old geohack format with colon and underscore is not supported
Optional geodata coordinates parameters, the old geohack format with colon and underscore is not supported
Line 43: Line 43:
Use {{Para|display|title}} (or {{Para|display|inline,title}}) once per article, for the subject of the article, where appropriate.
Use {{Para|display|title}} (or {{Para|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 [[Wikipedia:Navigation templates|navigation templates]], but before any [[Wikipedia:Persondata|Persondata]] or [[Help:Category#Default sort key|Defaultsort]] templates, or [[Wikipedia:Categorization|Categories]].
* Per [[WP:ORDER]], the template is placed in articles after any [[Wikipedia:Navigation templates|navigation templates]], but before any [[Help:Category#Default sort key|Defaultsort]] templates, or [[Wikipedia:Categorization|Categories]].
* For full details, refer to {{tl|Coord/doc}}.
* For full details, refer to [[Template:Coord/doc]].
* Additional guidance is available: [[Wikipedia:Obtaining geographic coordinates|obtaining coordinates]], [[Geographic coordinate conversion|converting coordinates]]
* Additional guidance is available: [[Wikipedia:Obtaining geographic coordinates|obtaining coordinates]], [[Geographic coordinate conversion|converting coordinates]]


 
==TemplateData==
===Template Data===
{{TemplateData header}}
<templatedata>{
<templatedata>{
"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.",
"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.",
Line 60: Line 60:
   "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.5 km.",
     "type": "number",
     "type": "number",
     "required": true
     "required": true
Line 66: Line 66:
   "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 seconds part of the latitude. Do not be overly precise,  1\" is approximately 30 m.",
     "type": "number",
     "type": "number",
     "required": true
     "required": true
Line 84: Line 84:
   "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.5 km.",
     "type": "number",
     "type": "number",
     "required": true
     "required": true
Line 90: Line 90:
   "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 seconds part of the longitude. Do not be overly precise 1\" is approximately 30 m.",
     "type": "number",
     "type": "number",
     "required": true
     "required": true
Line 159: Line 159:


== See also ==
== See also ==
*{{t1|coord}} the base template has more details on some of the parameters
* {{tl|Coord}} the base template has more details on some of the parameters
*{{t1|coordDec}} an alternative version where signed decimal degrees are specified
* {{tl|CoordDec}} an alternative version where signed decimal degrees are specified
*{{t1|coordDM}}  an alternative version just degrees and minutes are specified
* {{tl|CoordDM}}  an alternative version just degrees and minutes are specified
<includeonly>
 
<!-- Categories go here, and interwikis go in Wikidata -->
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Coordinates templates]]
[[Category:Coordinates templates]]
</includeonly>
 
}}</includeonly>

Latest revision as of 13:00, 3 September 2020

A version of the {{Coord}} 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 parameters are all named parameters in the form name=value

  • 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)
  • notes
    |notes= text displayed immediately following the coordinates,
  • format How the coordinates are displayed
    |format=dec decimal format
    |format=dms degrees minutes and seconds format

Optional geodata coordinates parameters, the old geohack format with colon and underscore is not supported

  • dim: approximate size of the object, used to scale the map to fit.
  • scale: Scale of map display for this object, e.g. scale of 300 is 1:300. Gets converted into dim internally using formula dim = scale / 10. If both scale and dim are set, dim has precedence.
  • globe: earth by default, can be one of earth, mercury, venus, moon, mars, phobos, deimos, ganymede, callisto, io, europa, mimas, enceladus, tethys, dione, rhea, titan, hyperion, iapetus, phoebe, miranda, ariel, umbriel, titania, oberon, triton and pluto
  • name: name of this point, up to 255 bytes (UTF-8).
  • region: ISO 3166-1 alpha-2 country code (e.g. US or RU) or an ISO 3166-2 region code (e.g. US-FL or RU-MOS). This parameter is always capitalised internally.
  • type: type of object with these coordinates, can be one of the following: country, satellite, state, adm1st, adm2nd, adm3rd, city, isle, mountain, river, waterbody, event, forest, glacier, airport, railwaystation, edu, pass, camera, landmark.

Thus: {{CoordDM|57|18|22|N|4|27|42|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.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for this template in articles based on this TemplateData.

TemplateData for CoordDMS

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.

Template parameters

ParameterDescriptionTypeStatus
Latitude degrees1

The degrees part of the latitude, a positive whole number.

Numberrequired
Latitude minutes2

The minutes part of the latitude. Do not be overly precise, 1' is approximately 1.5 km.

Numberrequired
Latitude seconds3

The seconds part of the latitude. Do not be overly precise, 1" is approximately 30 m.

Numberrequired
Latitude direction4

Direction part of latitude: N or S.

Stringrequired
Longitude degrees5

The degrees part of the longitude, a positive whole number.

Numberrequired
Longitude minutes6

The minutes part of the longitude. Do not be overly precise 1' is approximately 1.5 km.

Numberrequired
Longitude seconds7

The seconds part of the longitude. Do not be overly precise 1" is approximately 30 m.

Numberrequired
Longitude direction8

Direction part of longitude: E or W.

Stringrequired
Displaydisplay

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

Stringoptional
Namename

a label to place on maps (default is PAGENAME)

Stringoptional
Notesnotes

text displayed immediately following the coordinates

Stringoptional
Formatformat

How the coordinates are displayed, either 'dec' or 'dms'

Stringoptional
Dimdim

approximate size of the object, used to scale the map to fit.

Stringoptional
Scalescale

Scale of map display for this object, e.g. scale of 300 is 1:300. Gets converted into ''dim'' internally using formula ''dim = scale / 10''. If both scale and dim are set, dim has precedence.

Stringoptional
Globeglobe

earth by default, can be one of earth, mercury, venus, moon, mars, phobos, deimos, ganymede, callisto, io, europa, mimas, enceladus, tethys, dione, rhea, titan, hyperion, iapetus, phoebe, miranda, ariel, umbriel, titania, oberon, triton and pluto

Stringoptional
Regionregion

[[ISO 3166-1 alpha-2]] country code (e.g. ''US'' or ''RU'') or an [[ISO 3166-2]] region code (e.g. ''US-FL'' or ''RU-MOS''). This parameter is always capitalised internally.

Stringoptional
Typetype

type of object with these coordinates, can be one of the following: country, satellite, state, adm1st, adm2nd, adm3rd, city, isle, mountain, river, waterbody, event, forest, glacier, airport, railwaystation, edu, pass, camera, landmark.

Stringoptional

See also

  • {{Coord}} the base template has more details on some of the parameters
  • {{CoordDec}} an alternative version where signed decimal degrees are specified
  • {{CoordDM}} an alternative version just degrees and minutes are specified