Template:CoordDMS/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Salix alba
(tidy)
meta>Salix alba
(update doc)
Line 18: Line 18:
* Latitude (N/S) must appear before longitude (E/W).
* Latitude (N/S) must appear before longitude (E/W).


Optional coordinate parameters follow the longitude and are separated by [[Underscore|an underscore ("_")]]:<br />
Optional parameters the are all named parameters in the form <code>name=value</code>
*[[Template:Coord#dim:D|dim]]: <code>dim:</code>'''''N''''' (viewing diameter in metres)
*'''display'''
*[[Template:Coord#region:R|region]]: <code>region:</code>'''''R''''' ([[ISO 3166-1 alpha-2]] or [[ISO 3166-2]] code)
*[[Template:Coord#type:T|type]]: <code>type:</code>'''''T''''' (<code>landmark</code> or <code>city(30,000)</code>, for example)
 
Other optional parameters are separated by [[Vertical bar|a pipe ("|")]]:<br />
*[[Template:Coord#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.
*[[Template:Coord#Name|name]]
*'''name'''
*: <code>name=</code>'''''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]])
Thus: '''<code><nowiki>{{CoordDMS|57|18|22|N|4|27|32|W|dim:30_region:US-WI_type:event</nowiki></code>'''
*'''Notes'''
::'''<code><nowiki>|display=inline,title|name=accident site}}</nowiki></code>'''
*: {{Para|notes}} text displayed immediately following the coordinates,
*'''format''' How the coordinates are displayed
*:{{Para|format|dec}} decimal format
*:{{Para|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: '''<code><nowiki>{{CoordDM|57|18|22|N|4|27|42|W| dim=30 | region=US-WI | type=event | display=inline,title | name=accident site}}</nowiki></code>'''


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.
Line 91: Line 99:
     "type": "string",   
     "type": "string",   
     "required": true
     "required": true
  },
  "9": {
    "label": "Coordinate parameters",
    "description": "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'",
    "type": "string", 
    "required": false
   },
   },


Line 120: Line 122:
     "label": "Format",
     "label": "Format",
     "description": "How the coordinates are displayed, either 'dec' or 'dms'",
     "description": "How the coordinates are displayed, either 'dec' or 'dms'",
    "type": "string", 
    "required": false
  },
  "dim": {
    "label": "Dim",
    "description": "approximate size of the object, used to scale the map to fit.",
    "type": "string", 
    "required": false
  },
  "scale": {
    "label": "Scale",
    "description": "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.",
    "type": "string", 
    "required": false
  },
  "globe": {
    "label": "Globe",
    "description": "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",
    "type": "string", 
    "required": false
  },
  "region": {
    "label": "Region",
    "description": "[[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": "string", 
    "required": false
  },
  "type": {
    "label": "Type",
    "description": "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.",
     "type": "string",   
     "type": "string",   
     "required": false
     "required": false
   }
   }
}}</templatedata>
}}</templatedata>



Revision as of 15:36, 16 July 2013

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 parameters the 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.


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.

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.5km.

Numberrequired
Latitude seconds3

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

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.5km.

Numberrequired
Longitude seconds7

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

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

  • 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