Template:CoordDec/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Salix alba
simple
 
meta>Salix alba
expand
Line 1: Line 1:
A coordinate template where the latitude and longitude are specified by signed decimal numbers.
A version of the {{t1|coord}} template where the latitude and longitude are specified by signed decimal numbers.
== Usage ==


'''Usage'''
'''Usage'''
Line 6: Line 7:
'''Example'''
'''Example'''
<code><nowiki>{{coordDec| -41.289 | 174.777 | display=inline}}</nowiki></code> gives {{coordDec| -41.289 | 174.777|display=inline}}
<code><nowiki>{{coordDec| -41.289 | 174.777 | display=inline}}</nowiki></code> gives {{coordDec| -41.289 | 174.777|display=inline}}
No alternate set of parameter are available for this template. See {{tl|coordDMS}} for angles specified in degrees minutes and seconds, and {{tl|coordDM}} for when just degrees and minutes are specified.
These [[Geographic coordinate system|coordinates]] are in [[Degree (angle)|degrees]] and [[Minute of arc|minutes]].
* [[Geodetic system|Map datum]] must be WGS84 (except for off-earth bodies).
* Avoid [[Wikipedia:WikiProject Geographical coordinates#Precision|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 <code>name=value</code>
*'''display'''
*: {{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|inline,title}} to display in both places.
*'''name'''
*: {{Para|name|X}} to label the place on maps (default is [[mw:Help:Magic words#Page names|PAGENAME]])
*'''Notes'''
*: {{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>{{CoordDec | -41.289 | 174.777 | 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.
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]].
* For full details, refer to {{tl|Coord/doc}}.
* Additional guidance is available: [[Wikipedia:Obtaining geographic coordinates|obtaining coordinates]], [[Geographic coordinate conversion|converting coordinates]]


===Template Data===
===Template Data===
<templatedata>{
<templatedata>{
"description": "Encodes the decimal latitude and longitude coordinates of a location, provides a link to a map of the location.",
"description": "Encodes the latitude and longitude coordinates of a location specified in degrees and minutes, provides a link to map of the location.",
"params": {
"params": {
   "1": {
   "1": {
Line 23: Line 62:
     "required": true
     "required": true
   },
   },
   "display": {
   "display": {
     "label": "Display",
     "label": "Display",
Line 28: Line 68:
     "type": "string",   
     "type": "string",   
     "required": false
     "required": false
   }
   },
}}</templatedata>
<!--
,
   "name": {
   "name": {
     "label": "Name",
     "label": "Name",
Line 47: Line 84:
     "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>
 
== See also ==
*{{t1|coord}} the base template has more details on some of the parameters
*{{t1|coordDMS}}  an alternative version where degrees, minutes and seconds are specified
*{{t1|coordDM}}  an alternative version where just degrees and minutes are specified
 
<includeonly>
<includeonly>
<!-- Categories go here, and interwikis go in Wikidata -->
[[Category:Coordinates templates]]
[[Category:Coordinates templates]]
</includeonly>
</includeonly>

Revision as of 14:26, 16 July 2013

A version of the Template:T1 template where the latitude and longitude are specified by signed decimal numbers.

Usage

Usage {{coordDec| ''decimal latitude'' | ''decimal longitude'' | display=inline,title}}

Example {{coordDec| -41.289 | 174.777 | display=inline}} gives Lua error: callParserFunction: function "#coordinates" was not found.{{#coordinates: -41.289 | 174.777|dim=|globe=|scale=|region=|type= | |name= }}

No alternate set of parameter are available for this template. See {{coordDMS}} for angles specified in degrees minutes and seconds, and {{coordDM}} for when just degrees and minutes are specified.

These coordinates are in degrees and minutes.

  • 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: {{CoordDec | -41.289 | 174.777 | 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.


Template Data

Encodes the latitude and longitude coordinates of a location specified in degrees and minutes, provides a link to map of the location.

Template parameters

ParameterDescriptionTypeStatus
Latitude1

The latitude in decimal format with negative for south eg -79.38.

Numberrequired
Longitude2

The longitude in decimal format, negative for west eg -79.38.

Numberrequired
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 degrees, minutes and seconds are specified
  • Template:T1 an alternative version where just degrees and minutes are specified