Difference between revisions of "Template:Coord/doc"

From Linguistic Team International Wiki
(Created page with "{{shortcut|WP:COORD}} {{TOCright}} ==Quick guide== {{coord how-to}} ==Purpose== This template, {{tl|coord}}, produces a link to a list of map sources, based on the geograp...")
(No difference)

Revision as of 16:44, 10 August 2015

table class=shortcutbox noprint style=float: right; border: 1px solid #aaa; background: #fff; margin: .3em .3em .3em 1em; padding: 3px; text-align: center;trth style=border: none; background: transparent;!-- Putting anchors on page: --span id=WP:COORD/span!-- Adding the shortcut links: --smallShortcut: br WP:COORD/small/table!-- Reporting if the first parameter is not a valid non-bracketed shortcut name: --noinclude

[create] Template-info.svg Template documentation

!-- Add categories and interwikis to the /doc subpage, not here! -- /noinclude

noinclude
[create] Template-info.svg Template documentation

!-- Add cats and interwikis to the /doc subpage, not here! -- /noinclude

Quick guide

Template:Coord how-to

Purpose

This template, {{coord}}, produces a link to a list of map sources, based on the geographical coordinates and other parameters, and provides a standardized notation for the coordinates.

The template is for WGS84 geographical coordinates (latitude;longitude) on Earth, which can be entered in either decimal notation, or degrees/minutes/seconds parameters, with the appropriate precision.

It links to http://stable.toolserver.org/geohack/geohack.php?pagename=Template:Coord/docparams=noinclude

[create] Template-info.svg Template documentation

!-- Add cats and interwikis to the /doc subpage, not here! -- /noinclude, then displays the coordinates. Clicking the blue globe Erioll world.svg activates the WikiMiniAtlas (needs Javascript).

The template outputs data in:

  • Degree/minutes/seconds (DMS, precision is degrees, or degrees/minutes, or degrees/minutes/seconds, based on input). Some conversions from decimal degrees to dms need fixing (see talk)
  • Decimal (precision by number of decimal places, based on input)
  • Geo microformat.

{{coord}} is used by tools which parse the raw Wikipedia database dumps, such as Google Earth. To ensure that the coordinates are parsed correctly display=title must be used. See How do I get my Wikipedia article to show up in the Google Earth Geographic Web layer?. The template must not be modified without prior discussion.

For articles which have no coordinates, but need them, use {{coord missing}}.

See also Wikipedia:WikiProject Geographical coordinates.

Superseded templates

This single template supersedes {{coor d}}, {{coor dm}}, {{coor dms}}, {{coor at d}}, {{coor at dm}}, {{coor at dms}}, {{coor title d}}, {{coor title dm}}, {{coor title dms}}, and the Geolinks and Mapit templates. All parameters can be used as before - see Usage.

Examples: table class=wikitable trtd#123;{coord|12|N|45|W|display=title}#125;/tdtdReplaces #123;{coor title d|12|N|45|W}#125;/tdtd/td/tr

trtd#123;{coord|12|34|N|45|33|W|display=title}#125;/tdtdReplaces #123;{coor title dm|12|34|N|45|33|W}#125;/tdtd/td/tr

trtd#123;{coord|12|34|56|N|45|33|22|W|display=title}#125;/tdtdReplaces #123;{coor title dms|12|34|56|N|45|33|8|W}#125;/tdtd/td/tr

trtd#123;{coord|12|34|12|N|45|33|45|W|display=inline,title}#125;/tdtdReplaces #123;{coor at dms|12|34|12|N|45|33|45|W}#125;/tdtdYes check.svgspan style=display:noneY/spannoinclude

[create] Template-info.svg Template documentation

/noinclude Donenoinclude

[create] Template-info.svg Template documentation

/noinclude/td/tr

trtd#123;{coord|10.2|-20.3|display=inline}#125; or #123;{coord|10.2|-20.3}#125;/tdtdReplaces #123;{coor d|10.2|N|-20.3|E}#125;/tdtd/td/tr

trtd#123;{coord|44.4|-111.1|type:city_region:US|display=inline,title}#125;/tdtdReplaces #123;{Geolinks-US-cityscale|44.4|-111.1}#125;/tdtd/td/tr

trtd#123;{coord|51.01234|-1.56789|type:landmark_region:GB|display=inline,title}#125;/tdtdReplaces #123;{Geolinks-UK-buildingscale|51.01234|-1.56789}#125;/tdtd/td/tr

trtd#123;{coord|-35.5|150.1|type:landmark_region:AU|display=inline,title}#125;/tdtdReplaces #123;{Mapit-AUS-suburbscale|lat=-35.5|long=150.1}#125;/tdtd/td/tr

trtd#123;{coord|12|34|12|N|45|33|45|W|display=title}#125;/tdtdReplaces #123;{CoorHeader|12|34|12|N|45|33|45|W}#125;/tdtdYes check.svgspan style=display:noneY/spannoinclude

[create] Template-info.svg Template documentation

/noinclude Donenoinclude

[create] Template-info.svg Template documentation

/noinclude/td/tr

/table

Usage

#123;{coord|latitude|longitude|coordinate parameters|template parameters}#125;
#123;{coord|dd|N/S|dd|E/W|coordinate parameters|template parameters}#125;
#123;{coord|dd|mm|N/S|dd|mm|E/W|coordinate parameters|template parameters}#125;
#123;{coord|dd|mm|ss|N/S|dd|mm|ss|E/W|coordinate parameters|template parameters}#125;

There are two kinds of parameters, all optional:

  • span id=1Coordinate parameters/span: Recognised by the map server, given in the format parameter:value and separated from each other with the underscore character '_'. Common coordinate parameters include type, region, and scale. See coordinate parameters for a comprehensive list.
  • span id=2Template parameters/span: Used by the template itself, given in the format parameter=value and separated from each other with the pipe character '|'. The supported template parameters are display, name and format.
    • display can be one of the following:
      • codedisplay=inline/code - Display the coordinate inline (default)
      • codedisplay=title/code - Display the coordinate by the article title (replaces {{coor title dms}} family), shortcut: codedisplay=t/code
      • codedisplay=inline,title/code - Display the coordinate both inline and at title (replaces {{coor at dms}} family) br Note: using the codetitle/code attribute indicates that the coordinates apply to the article, and not just one of (perhaps many) places mentioned in it mdash; so it should only be omitted in the latter case. codedisplay=title,inline/code works also. Shortcut: codedisplay=it/code
    • format can be used to force dec or dms coordinate display for all readers
    • name can be used to annotate inline coordinates for display in map services and other external use. It should not be used with coordinates in the article title or within an infobox, as in those cases the name is implicit from the article title.

Examples

codenowikiincludeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude/nowiki/code
includeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude
Toronto - Fully decimal - N W
codenowikiincludeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude/nowiki/code
includeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude
Toronto - less precise
codenowikiincludeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude/nowiki/code
includeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude
Toronto - medium precision with trailing zeroes
codenowikiincludeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude/nowiki/code
includeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude
Toronto - decimal with Northing Westing
codenowikiincludeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude/nowiki/code
includeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude
Toronto - degrees minutes
codenowikiincludeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude/nowiki/code
includeonlyTemplate:Coord/display/inline!--
--!-- 
--!-- 
--!-- 
--/includeonlynoinclude
[create] Template-info.svg Template documentation
/noinclude
Toronto - degrees,