Difference between revisions of "Template:GNIS/doc"

From blackwiki
Jump to navigation Jump to search
imported>DixonDBot
m (Migrating 7 interwiki links, now provided by Wikidata on d:Q5619685)
imported>Zyxw
(update documentation and examples)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
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]].
+
These templates generate external links to the [[Geographic Names Information System]] (GNIS) published by the [[United States Geological Survey]] (USGS).
  
 
==Template:GNIS==
 
==Template:GNIS==
Line 15: Line 15:
  
 
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.
 +
 +
Examples:
 +
<nowiki>{{</nowiki>GNIS | 871352 | Mount Washington }}
 +
<nowiki>{{</nowiki>GNIS |id= 871352 |name= Mount Washington }}
 +
 +
Results:
 +
<br/>{{GNIS | 871352 | Mount Washington }}
 +
<br/>{{GNIS |id= 871352 |name= Mount Washington }}
  
 
===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 Feature ID number:
  
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''|type=antarid}}
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''|type=antarid}}
 
  <nowiki>{{</nowiki>GNIS|id=''ID''|name=''Name''|type=antarid}}
 
  <nowiki>{{</nowiki>GNIS|id=''ID''|name=''Name''|type=antarid}}
 +
 +
Examples:
 +
<nowiki>{{</nowiki>GNIS | 2828 | Clarke Glacier |type= antarid }}
 +
<nowiki>{{</nowiki>GNIS |id=2828 |name= Clarke Glacier |type= antarid }}
 +
 +
Results:
 +
<br/>{{GNIS | 2828 | Clarke Glacier |type= antarid }}
 +
<br/>{{GNIS |id= 2828 |name= Clarke Glacier |type= antarid }}
  
 
==Template:GNIS 2==
 
==Template:GNIS 2==
Line 28: Line 44:
 
  <nowiki>{{</nowiki>GNIS 2|id=''ID''}}
 
  <nowiki>{{</nowiki>GNIS 2|id=''ID''}}
  
If desired, the template can display the feature name as the [[anchor text]], which must be specified in a second unnamed parameter (optionally, this can be named <code>name</code>):
+
Examples:
 +
<nowiki>{{</nowiki>GNIS 2 | 871352 }}
 +
<nowiki>{{</nowiki>GNIS 2 |id= 871352 }}
 +
 
 +
Results:
 +
<br/>{{GNIS 2 | 871352 }}
 +
<br/>{{GNIS 2 |id= 871352 }}
  
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''}}
+
If desired, the template can display the feature name as the [[anchor text]], which can be specified in a second unnamed parameter (optionally, this can be named <code>name</code>):
  <nowiki>{{</nowiki>GNIS|id=''ID''|name=''Name''}}
+
 
 +
  <nowiki>{{</nowiki>GNIS 2|''ID''|''Name''}}
 +
  <nowiki>{{</nowiki>GNIS 2|id=''ID''|name=''Name''}}
  
 
Examples:
 
Examples:
  <nowiki>{{</nowiki>GNIS 2|871352}}
+
  <nowiki>{{</nowiki>GNIS 2 | 871352 | Mount Washington }}
  <nowiki>{{</nowiki>GNIS 2|871352|Mount Washington}}
+
  <nowiki>{{</nowiki>GNIS 2 |id= 871352 |name= Mount Washington }}
  
 
Results:
 
Results:
<br/>{{GNIS 2|871352}}
+
<br/>{{GNIS 2 | 871352 | Mount Washington }}
<br/>{{GNIS 2|871352|Mount Washington}}
+
<br/>{{GNIS 2 |id= 871352 |name= Mount Washington }}
  
 
===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 Feature ID number.
  
 
Examples:
 
Examples:
  <nowiki>{{</nowiki>GNIS 2|2828|type=antarid}}
+
  <nowiki>{{</nowiki>GNIS 2 | 2828 |type= antarid }}
  <nowiki>{{</nowiki>GNIS 2|2828|Clarke Glacier|type=antarid}}
+
  <nowiki>{{</nowiki>GNIS 2 |id= 2828 |name= Clarke Glacier |type= antarid }}
  
 
Results:
 
Results:
<br/>{{GNIS 2|2828|type=antarid}}
+
<br/>{{GNIS 2 | 2828 |type= antarid }}
<br/>{{GNIS 2|2828|Clarke Glacier|type=antarid}}
+
<br/>{{GNIS 2 |id= 2828 |name= Clarke Glacier |type= antarid }}
  
 
==Template:GNIS 3==
 
==Template:GNIS 3==
{{tlx|GNIS 3}} generates a bare [[URL]]. The only required parameter is the GNIS Feature ID number:
+
{{tlx|GNIS 3}} generates a bare [[URL]]. The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named <code>id</code>):
  
 
  <nowiki>{{</nowiki>GNIS 3|''ID''}}
 
  <nowiki>{{</nowiki>GNIS 3|''ID''}}
 +
<nowiki>{{</nowiki>GNIS 3|id=''ID''}}
  
Example:
+
Examples:
  <nowiki>{{</nowiki>GNIS 3|871352}}
+
  <nowiki>{{</nowiki>GNIS 3 | 871352 }}
 +
<nowiki>{{</nowiki>GNIS 3 |id= 871352 }}
  
Result:
+
Results:
<br/>{{GNIS 3|871352}}
+
<br/>{{GNIS 3 | 871352 }}
 +
<br/>{{GNIS 3 |id= 871352 }}
  
 
===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 Feature ID number.
  
Example:
+
Examples:
  <nowiki>{{</nowiki>GNIS 3|type=antarid|9763}}
+
  <nowiki>{{</nowiki>GNIS 3 |type= antarid | 9763 }}
 +
<nowiki>{{</nowiki>GNIS 3 |type= antarid |id= 9763 }}
  
Result:
+
Results:
<br/>{{GNIS 3|type=antarid|9763}}
+
<br/>{{GNIS 3 |type= antarid | 9763 }}
 +
<br/>{{GNIS 3 |type= antarid | id= 9763 }}
  
 
===Use in a template===
 
===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]]
Line 85: Line 114:
 
Result:
 
Result:
 
<br/>{{Cite web
 
<br/>{{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]]
Line 93: Line 122:
  
 
==Template:GNIS 4==
 
==Template:GNIS 4==
{{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>):
+
{{tlx|GNIS 4}} generates an external link which displays the GNIS Feature ID number. The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named <code>id</code>):
  
 
  <nowiki>{{</nowiki>GNIS 4|''ID''}}
 
  <nowiki>{{</nowiki>GNIS 4|''ID''}}
 
  <nowiki>{{</nowiki>GNIS 4|id=''ID''}}
 
  <nowiki>{{</nowiki>GNIS 4|id=''ID''}}
  
Example:
+
Examples:
  <nowiki>{{</nowiki>GNIS 4|871352}}
+
  <nowiki>{{</nowiki>GNIS 4 | 871352 }}
 +
<nowiki>{{</nowiki>GNIS 4 | id= 871352 }}
  
Result:
+
Results:
<br/>{{GNIS 4|871352}}
+
<br/>{{GNIS 4 | 871352 }}
 +
<br/>{{GNIS 4 |id= 871352 }}
  
 
===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 Feature ID number.
  
Example:
+
Examples:
  <nowiki>{{</nowiki>GNIS 4|2828|type=antarid}}
+
  <nowiki>{{</nowiki>GNIS 4 | 2828 |type= antarid }}
 +
<nowiki>{{</nowiki>GNIS 4 |id= 2828 |type= antarid }}
  
Result:
+
Results:
<br/>{{GNIS 4|2828|type=antarid}}
+
<br/>{{GNIS 4 | 2828 |type= antarid }}
 +
<br/>{{GNIS 4 |id= 2828 |type= antarid }}
  
 
==Instructions==
 
==Instructions==
# Go to http://geonames.usgs.gov/pls/gnispublic/
+
# Go to http://geonames.usgs.gov/apex/f?p=gnispq
 
# 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.
# Copy the 'ID' and insert it into:
+
# Copy the 'ID' and insert it into <nowiki>{{</nowiki><code>GNIS|...}}</code>, <nowiki>{{</nowiki><code>GNIS 2|...}}</code>, <nowiki>{{</nowiki><code>GNIS 3|...}}</code>, or <nowiki>{{</nowiki><code>GNIS 4|...}}</code>
#* <nowiki>{{</nowiki><code>GNIS|...}}</code> or <nowiki>{{</nowiki><code>GNIS 2|...}}</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>
 
# 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>
  
Line 132: Line 164:
 
! {2} {{nobold|or}} name=
 
! {2} {{nobold|or}} name=
 
| Optional
 
| Optional
| GNIS Feature Name (only in Template:GNIS), defaults to <nowiki>{{PAGENAME}}</nowiki>
+
| GNIS Feature Name: only in [[Template:GNIS]] (defaults to <nowiki>{{PAGENAME}}</nowiki>) and [[Template:GNIS2]] (no default)
 
|-
 
|-
 
! type=
 
! type=
Line 141: Line 173:
 
==See also==
 
==See also==
 
* [[Special:Linksearch/geonames.usgs.gov]]
 
* [[Special:Linksearch/geonames.usgs.gov]]
** [[Special:Linksearch/geonames.usgs.gov/pls/gnispublic/f?p=gnispq]]
+
** [[Special:Linksearch/geonames.usgs.gov/apex/f?p=gnispq]] (current format)
 +
** [[Special:Linksearch/geonames.usgs.gov/pls/gnispublic/f?p=gnispq]] (old format)
 
* [[Template:Cite gnis]]
 
* [[Template:Cite gnis]]
 
* [[Template:Mountain index row]]
 
* [[Template:Mountain index row]]
Line 147: Line 180:
 
** [[Template:Cite bcgnis]] (British Columbia)
 
** [[Template:Cite bcgnis]] (British Columbia)
 
* [[Template:GPN]] (Gazetteer of Planetary Nomenclature)
 
* [[Template:GPN]] (Gazetteer of Planetary Nomenclature)
<includeonly>
+
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
<!-- Categories go here, and interwikis go in Wikidata -->
[[Category:U.S. Government external link templates|{{PAGENAME}}]]
+
[[Category:U.S. Government external link templates]]
 
+
}}</includeonly>
</includeonly>
 
 
 
<includeonly>
 
[[sl:Predloga:Gnis]]
 
</includeonly>
 

Revision as of 00:29, 7 May 2014

These templates generate external links to the Geographic Names Information System (GNIS) published by the United States Geological Survey (USGS).

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}}
{{GNIS|id=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}}
{{GNIS|id=ID|name=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.

Examples:

{{GNIS | 871352 | Mount Washington }}
{{GNIS |id= 871352 |name= Mount Washington }}

Results:
U.S. Geological Survey Geographic Names Information System: Mount Washington
U.S. Geological Survey Geographic Names Information System: Mount Washington

Antarctica

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

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

Examples:

{{GNIS | 2828 | Clarke Glacier |type= antarid }}
{{GNIS |id=2828 |name= Clarke Glacier |type= antarid }}

Results:
U.S. Geological Survey Geographic Names Information System: Clarke Glacier
U.S. Geological Survey Geographic Names Information System: Clarke Glacier

Template:GNIS 2

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

{{GNIS 2|ID}}
{{GNIS 2|id=ID}}

Examples:

{{GNIS 2 | 871352 }}
{{GNIS 2 |id= 871352 }}

Results:
[1]
[2]

If desired, the template can display the feature name as the anchor text, which can be specified in a second unnamed parameter (optionally, this can be named name):

{{GNIS 2|ID|Name}}
{{GNIS 2|id=ID|name=Name}}

Examples:

{{GNIS 2 | 871352 | Mount Washington }}
{{GNIS 2 |id= 871352 |name= Mount Washington }}

Results:
Mount Washington
Mount Washington

Antarctica

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

Examples:

{{GNIS 2 | 2828 |type= antarid }}
{{GNIS 2 |id= 2828 |name= Clarke Glacier |type= antarid }}

Results:
[3]
Clarke Glacier

Template:GNIS 3

{{GNIS 3}} generates a bare URL. The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named id):

{{GNIS 3|ID}}
{{GNIS 3|id=ID}}

Examples:

{{GNIS 3 | 871352 }}
{{GNIS 3 |id= 871352 }}

Results:
https://geonames.usgs.gov/apex/f?p=gnispq:3:::NO::P3_FID:871352
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 Feature ID number.

Examples:

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

Results:
https://geonames.usgs.gov/apex/f?p=gnispq:5:::NO::P5_ANTAR_ID:9763
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 the GNIS Feature ID number (optionally, this parameter can be named id):

{{GNIS 4|ID}}
{{GNIS 4|id=ID}}

Examples:

{{GNIS 4 | 871352 }}
{{GNIS 4 | id= 871352 }}

Results:
871352
871352

Antarctica

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

Examples:

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

Results:
2828
2828

Instructions

  1. Go to http://geonames.usgs.gov/apex/f?p=gnispq
  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|...}}, {{GNIS 2|...}}, {{GNIS 3|...}}, or {{GNIS 4|...}}
  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}}) and Template:GNIS2 (no default)
type= Optional antarid (for locations in Antarctica)

See also