Difference between revisions of "Template:GEOnet/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(→‎Examples: update examples and table formatting)
imported>Zyxw
(update documentation, add TemplateData)
Line 2: Line 2:
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
{{TOC right}}
 
{{TOC right}}
{{Tl|GEOnet}} provides an external link to a specific geographic feature name from the [[GEOnet Names Server]] (GNS), published by the [[National Geospatial-Intelligence Agency]] (NGA). The template uses the GEOnet Feature__Unique_Feature_ID ([[Unique Feature Identifier]] or UFI).
+
{{Tl|GEOnet}} provides an external link to a specific geographic feature name from the [[GEOnet Names Server]] (GNS), published by the [[National Geospatial-Intelligence Agency]] (NGA). This template uses the GEOnet [[Unique Feature Identifier]] (UFI).
  
Intended to interface with the JavaScripts at:
+
<big>'''NOTE: The external links generated by this template no longer work. Please use {{Tl|GEOnet2}} (which requires a Name_GUID instead of a UFI) or {{Tl|GEOnet3}}.'''</big>
http://gnswww.nga.mil/geonames/Gazetteer/Search/
 
Which now apparently requires a NGA login account?
 
 
 
<big>'''NOTE: The external links generated by this template no longer work. Please use {{Tl|GEOnet2}} instead, which requires a Name_GUID instead of a UFI.'''</big>
 
  
 
== Usage ==
 
== Usage ==
<code>{{Tlx|GEOnet|''UFI''|''link-label-name''}}</code>
+
<code>{{Tlx|GEOnet|''UFI''|''Name''}}</code>
 
 
Unnamed parameters:
 
# ''<code>UFI</code>'' (required) – a Unique_Feature_ID, Feature__Unique_Feature_ID in the http://gnswww.nga.mil/geonames/Gazetteer/Search/Results.jsp URL.
 
# ''<code>link-label-name</code>'' (optional) – name used in the reference link, otherwise defaults to <nowiki>{{</nowiki>PAGENAME}}.
 
  
 
== Parameters ==
 
== Parameters ==
<table class="wikitable">
+
{{TemplateDataHeader}}
<caption>{{Tl|GEOnet}} parameters</caption>
+
<templatedata>{
<th>Parameter</th>
+
"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.",
<th>Mandatory or Optional</th>
+
"params": {
<th>Default</th>
+
  "1": {
<th>Description</th>
+
    "label": "UFI",
<tr>
+
    "description": "GEOnet Unique Feature Identifier (UFI), which is the value assigned to Feature__Unique_Feature_ID in the http://gnswww.nga.mil/geonames/Gazetteer/Search/Results.jsp URL.",
  <th>{1}</th>
+
    "type": "number",
  <td>Mandatory</td>
+
    "default": "",
  <td>Undefined</td>
+
    "required": true
  <td>Feature__Unique_Feature_ID search key</td>
+
   },
</tr>
+
   "2": {
<tr>
+
    "label": "Name",
   <th>{2}</th>
+
    "description": "Name or other descriptive text. If not given it defaults to the Wikipedia article name",
   <td>Optional</td>
+
    "type": "string",
  <td><code><nowiki>{{</nowiki>PAGENAME}}</code></td>
+
    "default": "{{PAGENAME}}",
   <td>Link-label-name</td>
+
    "required": false
</tr>
+
   }
</table>
+
}}</templatedata>
  
 
== Examples ==
 
== Examples ==
Line 50: Line 42:
 
| {{GEOnet|-2705195|Baku, Azerbaijan}}
 
| {{GEOnet|-2705195|Baku, Azerbaijan}}
 
|}
 
|}
 +
 +
The examples shown above generate a link to:
 +
* http://gnswww.nga.mil/geonames/Gazetteer/Search/Results.jsp?Feature__Unique_Feature_ID=-2705195&Diacritics=Yes&reload=1
  
 
== See also ==
 
== See also ==

Revision as of 02:31, 30 May 2014

{{GEOnet}} provides an external link to a specific geographic feature name from the GEOnet Names Server (GNS), published by the National Geospatial-Intelligence Agency (NGA). This template uses the GEOnet Unique Feature Identifier (UFI).

NOTE: The external links generated by this template no longer work. Please use {{GEOnet2}} (which requires a Name_GUID instead of a UFI) or {{GEOnet3}}.

Usage

{{GEOnet|UFI|Name}}

Parameters

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 GEOnet

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
UFI1

GEOnet Unique Feature Identifier (UFI), which is the value assigned to Feature__Unique_Feature_ID in the http://gnswww.nga.mil/geonames/Gazetteer/Search/Results.jsp URL.

Default
Numberrequired
Name2

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

Default
{{PAGENAME}}
Stringoptional

Examples

{{GEOnet}} examples
Code Produces
{{GEOnet|-2705195}} GEOnet/doc at GEOnet Names Server
{{GEOnet|-2705195|Baku, Azerbaijan}} Baku, Azerbaijan at GEOnet Names Server

The examples shown above generate a link to:

See also

Similar templates:

List of pages linking to gnswww.nga.mil:

External links