Difference between revisions of "Template:GNIS/doc"

From blackwiki
Jump to navigation Jump to search
imported>Droll
(→‎See also: tweaked)
imported>Colonies Chris
(minor fixes)
 
(11 intermediate revisions by 6 users not shown)
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]].
+
{{Wikidata property|P590|P804}}
  
==Template:GNIS==
+
[[Template:GNIS]] generates an external link to a Feature Detail Report from the [[Geographic Names Information System]] (GNIS), published by the [[United States Geological Survey]] (USGS). The link is displayed as "U.S. Geological Survey Geographic Names Information System: ''Name''", where ''Name'' is either the Wikipedia article name (<code><nowiki>{{</nowiki>PAGENAME}}</code>) or an optionally specified name.
[[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]]:
+
 
 +
== Usage ==
 +
 
 +
The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named <code>id</code>). The template then uses the Wikipedia article name as part of the [[anchor text]].
  
 
  <nowiki>{{</nowiki>GNIS|''ID''}}
 
  <nowiki>{{</nowiki>GNIS|''ID''}}
 +
<nowiki>{{</nowiki>GNIS|id=''ID''}}
  
To have the link text be other than the article name, use a second parameter (optionally, this can be named <code>name</code>):
+
If desired, a feature name other than the article name can be specified in a second unnamed parameter (optionally, this can be named <code>name</code>). This can be used if the article name contains disambiguation or when the GNIS feature name is different than the article name.
  
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''}}
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''}}
 +
<nowiki>{{</nowiki>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 {{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.
+
For GNIS features in Antarctica, add <code>|type=antarid</code>.
  
===Antarctica===
+
<nowiki>{{</nowiki>GNIS|''ID''|type=antarid}}
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID:
+
<nowiki>{{</nowiki>GNIS|id=''ID''|type=antarid}}
  
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''|type=antarid}}
 
  <nowiki>{{</nowiki>GNIS|''ID''|''Name''|type=antarid}}
 +
<nowiki>{{</nowiki>GNIS|id=''ID''|name=''Name''|type=antarid}}
  
==Template:GNIS 2==
+
== TemplateData ==
{{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''}}
 
 
 
Example:
 
<nowiki>{{</nowiki>GNIS 2|871352}}
 
 
 
Result:
 
<br/>{{GNIS 2|871352}}
 
 
 
===Antarctica===
 
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID.
 
 
 
Example:
 
<nowiki>{{</nowiki>GNIS 2|2828|type=antarid}}
 
 
 
Result:
 
<br/>{{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:
 
 
 
<nowiki>{{</nowiki>GNIS 3|''ID''}}
 
 
 
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.
 
 
 
Example:
 
<nowiki>{{</nowiki>GNIS 3|type=antarid|9763}}
 
 
 
Result:
 
<br/>{{GNIS 3|type=antarid|9763}}
 
 
 
===Use in a template===
 
<pre>
 
{{Cite web
 
| url = {{GNIS 3|112837}}
 
| title = Wheeler Lake
 
| work = [[Geographic Names Information System]]
 
| publisher = [[United States Geological Survey]]
 
| accessdate = 2009-07-05
 
}}
 
</pre>
 
 
 
Result:
 
<br/>{{Cite web
 
| url = {{GNIS 3|112837}}
 
| title = Wheeler Lake
 
| work = [[Geographic Names Information System]]
 
| publisher = [[United States Geological Survey]]
 
| accessdate = 2009-07-05
 
}}
 
  
==Template:GNIS 4==
+
{{TemplateData header}}
{{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>):
+
<templatedata>{
 +
"description": "This template generates an external link to a Feature Detail Report from the Geographic Names Information System (GNIS), published by the United States Geological Survey (USGS). The link is displayed as 'U.S. Geological Survey Geographic Names Information System: Name', where Name is either the Wikipedia article name ({{PAGENAME}}) or an optionally specified name.",
 +
"params": {
 +
  "1": {
 +
    "label": "ID",
 +
    "aliases": ["id"],
 +
    "description": "GNIS Feature ID, a number without leading zeros.",
 +
    "type": "number",
 +
    "default": "",
 +
    "required": true
 +
  },
 +
  "2": {
 +
    "label": "Name",
 +
    "aliases": ["name"],
 +
    "description": "GNIS Feature Name or other descriptive text. If not given it defaults to the Wikipedia article name",
 +
    "type": "string",
 +
    "default": "{{PAGENAME}}",
 +
    "required": false
 +
  },
 +
  "type": {
 +
    "label": "Type",
 +
    "description": "Use the value 'antarid' (type=antarid) for features in Antarctica.",
 +
    "type": "string",
 +
    "default": "",
 +
    "required": false
 +
  }
 +
}}</templatedata>
  
<nowiki>{{</nowiki>GNIS 4|''ID''}}
+
== Instructions ==
  
Example:
+
# Go to the [https://geonames.usgs.gov/apex/f?p=gnispq GNIS Feature Search] page.
<nowiki>{{</nowiki>GNIS 4|871352}}
+
# Search for the name, location, and/or class of the feature desired, e.g., to find a mountain called 'Mt. Foo', type '<code>mount foo</code>' in the Feature Name box and select 'Summit' from the Feature Class list.
 +
# Copy the 'ID' number for the desired feature and insert it into the <code><nowiki>{{</nowiki>GNIS|...}}</code> template.
 +
# The latitude and longitude can also be copied and used in the {{tlx|coord}} template, inserting the '{{para}}' vertical bar between degrees, minutes, seconds, and direction, e.g.: 441613N&nbsp;&nbsp;0711812W → <code><nowiki>{{</nowiki>coord|44|16|13|N|071|18|12|W|region:US}}</code>
  
Result:
+
== Examples ==
<br/>{{GNIS 4|871352}}
 
  
===Antarctica===
+
URL: https://geonames.usgs.gov/apex/f?p=gnispq:3:::NO::P3_FID:871352
For GNIS pages in Antarctica, use the <code>type=antarid</code> parameter and the corresponding Antarctic GNIS ID.
+
* ''Usage:'' <code><nowiki>{{</nowiki>GNIS | 871352 | Mount Washington }}</code>
 +
** ''Result:'' {{GNIS | 871352 | Mount Washington }}
 +
* ''Usage:'' <code><nowiki>{{</nowiki>GNIS |id= 871352 |name= Mount Washington }}</code>
 +
** ''Result:'' {{GNIS |id= 871352 |name= Mount Washington }}
  
Example:
+
URL: https://geonames.usgs.gov/apex/f?p=gnispq:5:::NO::P5_ANTAR_ID:2828
<nowiki>{{</nowiki>GNIS 4|2828|type=antarid}}
+
* ''Usage:'' <code><nowiki>{{</nowiki>GNIS | 2828 | Clarke Glacier |type= antarid }}</code>
 +
** ''Result:'' {{GNIS | 2828 | Clarke Glacier |type= antarid }}
 +
* ''Usage:'' <code><nowiki>{{</nowiki>GNIS |id= 2828 |name= Clarke Glacier |type= antarid }}</code>
 +
** ''Result:'' {{GNIS |id= 2828 |name= Clarke Glacier |type= antarid }}
  
Result:
+
== See also ==
<br/>{{GNIS 4|2828|type=antarid}}
 
  
==Instructions==
+
;Other GNIS templates:
# Go to http://geonames.usgs.gov/pls/gnispublic/
+
* {{tl|GNIS 2}} – link with anchor text "[1]" or "''Name''"
# 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.
+
* {{tl|GNIS 3}} – link as bare [[URL]] only, without anchor text
# Copy the 'ID' and insert it into:
+
* {{tl|GNIS 4}} – link with GNIS Feature ID number as the anchor text
#* <nowiki>{{</nowiki><code>GNIS|...}}</code> or <nowiki>{{</nowiki><code>GNIS 2|...}}</code>
+
* {{tl|Cite gnis}} – link using the {{tl|Cite web}} template, for use as a reference
# 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==
+
;List of pages linking to [[Special:Linksearch/geonames.usgs.gov|geonames.usgs.gov]]:
{| class="wikitable"
+
* [[Special:Linksearch/geonames.usgs.gov/apex/f?p=gnispq]] (current format)
! Parameter
+
* [[Special:Linksearch/geonames.usgs.gov/pls/gnispublic/f?p=gnispq]] (old format)
! Required or Optional
 
! Description
 
|-
 
! {1} {{nobold|or}} id=
 
| Required
 
| GNIS Feature ID, a number without leading zeros
 
|-
 
! {2} {{nobold|or}} name=
 
| Optional
 
| GNIS Feature Name (only in Template:GNIS), defaults to <nowiki>{{PAGENAME}}</nowiki>
 
|-
 
! type=
 
| Optional
 
| ''antarid'' (for locations in Antarctica)
 
|}
 
  
==See also==
+
;Similar templates:
* [[Special:Linksearch/geonames.usgs.gov]]
+
* {{tl|Mountain index row}} – includes an optional GNIS link
** [[Special:Linksearch/geonames.usgs.gov/pls/gnispublic/f?p=gnispq]]
+
* Canadian features ([[Canadian Geographical Names Data Base]], [[BC Geographical Names]])
* [[Template:Cite gnis]]
+
** {{tl|Cite cgndb}} – all of Canada
* [[Template:Mountain index row]]
+
** {{tl|Cite bcgnis}} – British Columbia
* [[Template:Cite cgndb]] (Canada)
+
* Non-U.S. geographic features ([[GEOnet Names Server]])
** [[Template:Cite bcgnis]] (British Columbia)
+
** {{tl|GEOnet2}}
* [[Template:GPN]] (Gazetteer of Planetary Nomenclature)
+
** {{tl|Cite gns}}
<includeonly>
+
* On Solar System features (Gazetteer of Planetary Nomenclature)
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
** {{tl|Gazetteer of Planetary Nomenclature}} – inline citations
[[Category:U.S. Government external link templates|{{PAGENAME}}]]
+
** {{tl|WGPSN}} – external links
  
[[cs:Šablona:GNIS]]
+
<includeonly>{{Sandbox other||
[[de:Vorlage:Gnis]]
+
<!-- Categories go here, and interwikis go in Wikidata -->
[[es:Plantilla:GNIS]]
+
[[Category:United States government external link templates]]
[[ja:Template:Gnis]]
+
}}</includeonly>
[[ro:Format:Gnis]]
 
[[sl:Predloga:Gnis]]
 
[[uk:Шаблон:GNIS]]
 
[[vi:Tiêu bản:Gnis]]
 
</includeonly>
 

Latest revision as of 19:02, 30 August 2020

Template:Wikidata property

Template:GNIS generates an external link to a Feature Detail Report from the Geographic Names Information System (GNIS), published by the United States Geological Survey (USGS). The link is displayed as "U.S. Geological Survey Geographic Names Information System: Name", where Name is either the Wikipedia article name ({{PAGENAME}}) or an optionally specified name.

Usage

The only required parameter is the GNIS Feature ID number (optionally, this parameter can be named id). The template then uses the Wikipedia article name as part of the anchor text.

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

If desired, a feature name other than the article name can be specified in a second unnamed parameter (optionally, this can be named name). This can be used if the article name contains disambiguation or when the GNIS feature name is different than the article name.

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

For GNIS features in Antarctica, add |type=antarid.

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

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for GNIS

This template generates an external link to a Feature Detail Report from the Geographic Names Information System (GNIS), published by the United States Geological Survey (USGS). The link is displayed as 'U.S. Geological Survey Geographic Names Information System: Name', where Name is either the Wikipedia article name ({{PAGENAME}}) or an optionally specified name.

Template parameters

ParameterDescriptionTypeStatus
ID1 id

GNIS Feature ID, a number without leading zeros.

Default
Numberrequired
Name2 name

GNIS Feature Name or other descriptive text. If not given it defaults to the Wikipedia article name

Default
{{PAGENAME}}
Stringoptional
Typetype

Use the value 'antarid' (type=antarid) for features in Antarctica.

Default
Stringoptional

Instructions

  1. Go to the GNIS Feature Search page.
  2. Search for the name, location, and/or class of the feature desired, e.g., to find a mountain called 'Mt. Foo', type 'mount foo' in the Feature Name box and select 'Summit' from the Feature Class list.
  3. Copy the 'ID' number for the desired feature and insert it into the {{GNIS|...}} template.
  4. The latitude and longitude can also be copied and used in the {{coord}} template, inserting the '|' vertical bar between degrees, minutes, seconds, and direction, e.g.: 441613N  0711812W → {{coord|44|16|13|N|071|18|12|W|region:US}}

Examples

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

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

See also

Other GNIS templates
  • {{GNIS 2}} – link with anchor text "[1]" or "Name"
  • {{GNIS 3}} – link as bare URL only, without anchor text
  • {{GNIS 4}} – link with GNIS Feature ID number as the anchor text
  • {{Cite gnis}} – link using the {{Cite web}} template, for use as a reference
List of pages linking to geonames.usgs.gov
Similar templates