Difference between revisions of "Template:CGNDB/doc"

From blackwiki
Jump to navigation Jump to search
imported>Mwtoews
(start doc)
 
imported>Mwtoews
m (reword)
Line 8: Line 8:
 
  <nowiki>{{</nowiki>CGNDB|''id''|''name''<nowiki>}}</nowiki>
 
  <nowiki>{{</nowiki>CGNDB|''id''|''name''<nowiki>}}</nowiki>
 
where:
 
where:
*<code>''id''</code> is the "name" alphanumeric id found from a database name, and
+
*<code>''id''</code> is the five-digit alphanumeric unique identifier for the geographic feature, and
 
*<code>''name''</code> is the optional name to display (otherwise it will use the page name).
 
*<code>''name''</code> is the optional name to display (otherwise it will use the page name).
  

Revision as of 07:53, 27 February 2009

Purpose

To provide a simple format to linking to information in the Geographical Names of Canada Data Base. This is specifically useful for linking information to either the "External links" or "References" sections of Wikipedia articles.

Usage

{{CGNDB|id|name}}

where:

  • id is the five-digit alphanumeric unique identifier for the geographic feature, and
  • name is the optional name to display (otherwise it will use the page name).

Example

  1. Search the geographic name in the Canadian Geographical Names Data Base
  2. If the search successful identifies your result, navigate to the "Details" for the item
  3. Scan the URL for the unique CGNDB ID. For example, searching for "Deadwood River" and selecting "Details" results in the following URL:
    http://geonames2.nrcan.gc.ca/cgi-bin/v9/sima_unique_v9?english?JBBPB?C
  4. Use the code for id in the template:
    {{CGNDB|JBBPB|Deadwood River}}
  5. Here is the result:
    "Deadwood River". Geographical Names Data Base. Natural Resources Canada.

If the article name ("Deadwood River" in this example) and the desired display name are identical, you can omit the second parameter. Conversely, if the article name is not identical to the article name (e.g., Battle River (Canada)), you should use this parameter for proper display.

Where to use it

You may use this template in the external links section; for example:

==External links==
*{{CGNDB|IARTK|Battle River}}

You may also use this template as a reference or footnote, for example:

This is a fact.<ref>{{CGNDB|JBBPB}}</ref>

which will appear at the bottom of the article in the "References" section, using the <references/> tag.

Coordinates

The CGNDB entry is a quick source to establish geographic coordinates for a location's latitude and longitude. Users are encouraged to add coordinates to articles about locations using coordinate template.

The {{coord}} template is particularly flexible, and can be used in many ways; for example:

  • Using: {{coord|52|51|26|N|110|0|0|W}} will result in Lua error: callParserFunction: function "#coordinates" was not found.
  • Include the |display=... parameter in the template (as the last argument) to modify how the coordinate is displayed:

External links

See also