Difference between revisions of "Template:GNIS/doc"

From blackwiki
Jump to navigation Jump to search
imported>Pinky sl
m (sl:Predloga:Gnis)
imported>Zyxw
(update documentation)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
These are templates that generate links to the [[United States Geological Survey]]'s [[Geographic Names Information System|'''G'''eographic '''N'''ames '''I'''nformation '''S'''ystem]].
+
These are templates that generate external links to the [[United States Geological Survey]]'s [[Geographic Names Information System|'''G'''eographic '''N'''ames '''I'''nformation '''S'''ystem]].
  
===Template:GNIS===
+
==Template:GNIS==
The required parameter is just the ID number (optionally, the parameter can be named <code>id</code>) and the template then uses the article title as the [[anchor text]]:
+
[[Template:GNIS]] generates an external link to a GNIS page. The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named <code>id</code>) and the template then uses the article title as the [[anchor text]]:
  
 
  <nowiki>{{</nowiki>GNIS|''ID''}}
 
  <nowiki>{{</nowiki>GNIS|''ID''}}
  
To have the link text be other than the article name, use a second parameter (optionally, it can be named <code>name</code>):
+
To have the link text be other than the article name, use a second parameter (optionally, this can be named <code>name</code>):
  
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''}}
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''}}
Line 14: Line 14:
 
This can be used when the Wikipedia page name contains disambiguation brackets; for example, at the page: [[Mount Washington (New Hampshire)]], use {{nowrap| <nowiki>{{</nowiki><code>GNIS{{!}}871352{{!}}Mount Washington}}</code>}} to have "{{GNIS|871352| Mount Washington}}" rather than "{{GNIS|871352| Mount Washington (New Hampshire)}}". This is also necessary should you need to add a link to an article about somebody or something other than the linked feature.
 
This can be used when the Wikipedia page name contains disambiguation brackets; for example, at the page: [[Mount Washington (New Hampshire)]], use {{nowrap| <nowiki>{{</nowiki><code>GNIS{{!}}871352{{!}}Mount Washington}}</code>}} to have "{{GNIS|871352| Mount Washington}}" rather than "{{GNIS|871352| Mount Washington (New Hampshire)}}". This is also necessary should you need to add a link to an article about somebody or something other than the linked feature.
  
====Antarctica====
+
===Antarctica===
 
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID:
 
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID:
  
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''|type=antarid}}
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''|type=antarid}}
  
===Template:GNIS 2===
+
==Template:GNIS 2==
This template works the same as {{tlx|GNIS}}, but simply produces a footnote-type link, without any [[anchor text]]. The required parameter is just the ID number (optionally, the parameter can be named <code>id</code>):
+
{{tlx|GNIS 2}} generates a footnote-type link, without any [[anchor text]]. The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named <code>id</code>):
+
 
 
  <nowiki>{{</nowiki>GNIS 2|''ID''}}
 
  <nowiki>{{</nowiki>GNIS 2|''ID''}}
  
Sample:
+
Example:
 
 
 
  <nowiki>{{</nowiki>GNIS 2|871352}}
 
  <nowiki>{{</nowiki>GNIS 2|871352}}
  
 
Result:
 
Result:
 +
<br/>{{GNIS 2|871352}}
  
{{GNIS 2|871352}}
+
===Antarctica===
 
+
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID.
====Antarctica====
 
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID:
 
 
 
<nowiki>{{</nowiki>GNIS 2|''ID''|type=antarid}}
 
 
 
Sample:
 
  
 +
Example:
 
  <nowiki>{{</nowiki>GNIS 2|2828|type=antarid}}
 
  <nowiki>{{</nowiki>GNIS 2|2828|type=antarid}}
  
 
Result:
 
Result:
 +
<br/>{{GNIS 2|2828|type=antarid}}
  
{{GNIS 2|2828|type=antarid}}
+
==Template:GNIS 3==
 +
{{tlx|GNIS 3}} generates a bare [[URL]]. The only required parameter is the GNIS Feature ID number:
  
===Template:GNIS 3===
 
The required parameter is just the ID number (optionally, the parameter can be named <code>id</code>):
 
 
  <nowiki>{{</nowiki>GNIS 3|''ID''}}
 
  <nowiki>{{</nowiki>GNIS 3|''ID''}}
  
It's meant to be used mainly within other templates (see sample 2).
+
Example:
 +
<nowiki>{{</nowiki>GNIS 3|871352}}
 +
 
 +
Result:
 +
<br/>{{GNIS 3|871352}}
  
 +
===Antarctica===
 
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID.
 
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID.
  
====Sample 1====
+
Example:
  <nowiki>* {{</nowiki>GNIS 3|871352}}
+
  <nowiki>{{</nowiki>GNIS 3|type=antarid|9763}}
  
Result:  
+
Result:
* {{GNIS 3|871352}}
+
<br/>{{GNIS 3|type=antarid|9763}}
  
====Sample 2====
+
===Use in a template===
<pre>
+
<pre>
* {{cite web  
+
{{Cite web
  |url= {{GNIS 3|112837}}  
+
| url = {{GNIS 3|112837}}
  |title= Wheeler Lake  
+
| title = Wheeler Lake
  |work= [[Geographic Names Information System]]  
+
| work = [[Geographic Names Information System]]
  |publisher= [[United States Geological Survey]]  
+
| publisher = [[United States Geological Survey]]
  |accessdate= 2009-07-05
+
| accessdate = 2009-07-05
  }}
+
}}
 
</pre>
 
</pre>
  
 
Result:
 
Result:
* {{cite web |url={{GNIS 3|112837}} |title=Wheeler Lake |work=[[Geographic Names Information System]] |publisher=[[United States Geological Survey]] |accessdate=2009-07-05}}
+
<br/>{{Cite web
 +
| url = {{GNIS 3|112837}}
 +
| title = Wheeler Lake
 +
| work = [[Geographic Names Information System]]
 +
| publisher = [[United States Geological Survey]]
 +
| accessdate = 2009-07-05
 +
}}
  
====Sample 3====
+
==Template:GNIS 4==
  <nowiki>* {{</nowiki>GNIS 3|type=antarid|9763}}
+
{{tlx|GNIS 4}} generates an external link which displays the GNIS Feature ID number. The only required parameter is ID number (optionally, this parameter can be named <code>id</code>):
 +
 
 +
  <nowiki>{{</nowiki>GNIS 4|''ID''}}
 +
 
 +
Example:
 +
<nowiki>{{</nowiki>GNIS 4|871352}}
  
 
Result:
 
Result:
* {{GNIS 3|type=antarid|9763}}
+
<br/>{{GNIS 4|871352}}
  
===Instructions===
+
===Antarctica===
 +
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID.
 +
 
 +
Example:
 +
<nowiki>{{</nowiki>GNIS 4|2828|type=antarid}}
 +
 
 +
Result:
 +
<br/>{{GNIS 4|2828|type=antarid}}
 +
 
 +
==Instructions==
 
# Go to http://geonames.usgs.gov/pls/gnispublic/
 
# Go to http://geonames.usgs.gov/pls/gnispublic/
 
# Search for the name, location, and / or type of the feature desired, e.g., to find a mountain called 'Mt. Foo', put '<code>mount foo</code>' in the Feature Name and select 'Summit' for the Feature Class.
 
# Search for the name, location, and / or type of the feature desired, e.g., to find a mountain called 'Mt. Foo', put '<code>mount foo</code>' in the Feature Name and select 'Summit' for the Feature Class.
Line 86: Line 106:
 
# You can also copy the latitude and longitude and use them in the {{tlx|coord}} template, inserting the '{{para}}' vertical bar in-between, e.g.: 44_16_13_N&nbsp;&nbsp;071_18_12_W → <code><nowiki>{{</nowiki>coord|44|16|13|N|071|18|12|W|region:US}}</code>
 
# You can also copy the latitude and longitude and use them in the {{tlx|coord}} template, inserting the '{{para}}' vertical bar in-between, e.g.: 44_16_13_N&nbsp;&nbsp;071_18_12_W → <code><nowiki>{{</nowiki>coord|44|16|13|N|071|18|12|W|region:US}}</code>
  
===Parameters===
+
==Parameters==
<table class="wikitable">
+
{| class="wikitable"
<th>Parameter</th>
+
! Parameter
<th>Mandatory or Optional</th>
+
! Required or Optional
<th>Default</th>
+
! Description
<th>Description</th>
+
|-
<tr>
+
! {1} {{nobold|or}} id=
  <th>{1}</th>
+
| Required
  <td>Required</td>
+
| GNIS Feature ID, a number without leading zeros
  <td>Undefined</td>
+
|-
  <td>GNIS Feature ID</td>
+
! {2} {{nobold|or}} name=
</tr>
+
| Optional
<tr>
+
| GNIS Feature Name (only in Template:GNIS), defaults to <nowiki>{{PAGENAME}}</nowiki>
  <th>type=</th>
+
|-
  <td>Optional</td>
+
! type=
  <td>&nbsp;</td>
+
| Optional
  <td>&nbsp;</td>
+
| ''antarid'' (for locations in Antarctica)
</tr>
+
|}
</table>
 
 
 
===See also===
 
*[[Template:Cite gnis]]
 
*[[Template:Mountain index row]]
 
*[[Template:Cite cgndb]] (Canada)
 
**[[Template:Cite bcgnis]] (British Columbia)
 
*[[Special:Linksearch/geonames.usgs.gov]]
 
*[[Template:Gpn]]
 
  
 +
==See also==
 +
* [[Special:Linksearch/geonames.usgs.gov]]
 +
** [[Special:Linksearch/geonames.usgs.gov/pls/gnispublic/f?p=gnispq]]
 +
* [[Template:Cite GNIS]]
 +
* [[Template:Mountain index row]]
 +
* [[Template:Cite cgndb]] (Canada)
 +
** [[Template:Cite bcgnis]] (British Columbia)
 +
* [[Template:GPN]] (Gazetteer of Planetary Nomenclature)
 
<includeonly>
 
<includeonly>
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->

Revision as of 18:52, 17 January 2013

These are templates that generate external links to the United States Geological Survey's Geographic Names Information System.

Template:GNIS

Template:GNIS generates an external link to a GNIS page. The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named id) and the template then uses the article title as the anchor text:

{{GNIS|ID}}

To have the link text be other than the article name, use a second parameter (optionally, this can be named name):

{{GNIS|ID|Name}}

This can be used when the Wikipedia page name contains disambiguation brackets; for example, at the page: Mount Washington (New Hampshire), use {{GNIS|871352|Mount Washington}} to have "U.S. Geological Survey Geographic Names Information System: Mount Washington" rather than "U.S. Geological Survey Geographic Names Information System: Mount Washington (New Hampshire)". This is also necessary should you need to add a link to an article about somebody or something other than the linked feature.

Antarctica

For GNIS pages in Antarctica, use the type=antarid parameter and the corresponding Antarctic GNIS ID:

{{GNIS|ID|Name|type=antarid}}

Template:GNIS 2

{{GNIS 2}} generates a footnote-type link, without any anchor text. The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named id):

{{GNIS 2|ID}}

Example:

{{GNIS 2|871352}}

Result:
[1]

Antarctica

For GNIS pages in Antarctica, use the type=antarid parameter and the corresponding Antarctic GNIS ID.

Example:

{{GNIS 2|2828|type=antarid}}

Result:
[2]

Template:GNIS 3

{{GNIS 3}} generates a bare URL. The only required parameter is the GNIS Feature ID number:

{{GNIS 3|ID}}

Example:

{{GNIS 3|871352}}

Result:
https://geonames.usgs.gov/apex/f?p=gnispq:3:::NO::P3_FID:871352

Antarctica

For GNIS pages in Antarctica, use the type=antarid parameter and the corresponding Antarctic GNIS ID.

Example:

{{GNIS 3|type=antarid|9763}}

Result:
https://geonames.usgs.gov/apex/f?p=gnispq:5:::NO::P5_ANTAR_ID:9763

Use in a template

{{Cite web
| url = {{GNIS 3|112837}}
| title = Wheeler Lake
| work = [[Geographic Names Information System]]
| publisher = [[United States Geological Survey]]
| accessdate = 2009-07-05
}}

Result:
"Wheeler Lake". Geographic Names Information System. United States Geological Survey. Retrieved 2009-07-05.

Template:GNIS 4

{{GNIS 4}} generates an external link which displays the GNIS Feature ID number. The only required parameter is ID number (optionally, this parameter can be named id):

{{GNIS 4|ID}}

Example:

{{GNIS 4|871352}}

Result:
871352

Antarctica

For GNIS pages in Antarctica, use the type=antarid parameter and the corresponding Antarctic GNIS ID.

Example:

{{GNIS 4|2828|type=antarid}}

Result:
2828

Instructions

  1. Go to http://geonames.usgs.gov/pls/gnispublic/
  2. Search for the name, location, and / or type of the feature desired, e.g., to find a mountain called 'Mt. Foo', put 'mount foo' in the Feature Name and select 'Summit' for the Feature Class.
  3. Copy the 'ID' and insert it into:
    • {{GNIS|...}} or {{GNIS 2|...}}
  4. You can also copy the latitude and longitude and use them in the {{coord}} template, inserting the '|' vertical bar in-between, e.g.: 44_16_13_N  071_18_12_W → {{coord|44|16|13|N|071|18|12|W|region:US}}

Parameters

Parameter Required or Optional Description
{1} or id= Required GNIS Feature ID, a number without leading zeros
{2} or name= Optional GNIS Feature Name (only in Template:GNIS), defaults to {{PAGENAME}}
type= Optional antarid (for locations in Antarctica)

See also