Template:KeyDescription

From OpenStreetMap Wiki
(Redirected from Template:Fa:KeyDescription)
Jump to navigation Jump to search
[Edit] [Purge] Template-info.svg Template documentation

exclamation mark

Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum.
Please discuss proposed changes on the talk page first.
Editing a template causes all pages that use the template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue. [statistics]

Intro

This template provides a description box suitable for keys. As of December 2018, a backing data item is created either by a bot or by hand for all pages that use this template. The bot copies many of the template parameters to the data item, making them available in a machine-readable format.

This template uses corresponding data item for some of the missing parameters (e.g. key, image, description, group, status, on*, ...), so in theory most of the template parameters are no longer needed, but they should not be deleted just yet -- some tools like TagInfo do not consume data items directly, but instead try to parse template parameters. Once TagInfo is updated, it will be ok to delete parameters -- just placing {{KeyDescription}} template without parameters to a properly named Key:* or Lang:Key:* page will show values from the data item in the correct language (for other pages key and lang parameters will still be needed).

To view or translate the data item, click the grey pencil icon next to the description, or click the OpenStreetMap Wiki item link in the left sidebar. If the description is different from the data item, it will also show a red pencil icon to edit the wiki page itself. They should be made identical. Description should be one or more complete sentences (start with a capitalized letter, ending with a period), max 250 symbols. Do not use any wiki markup. English label should be identical to the key (usually a lower case word). When translating, make sure to add description, but labels are optional. Do not copy English label if it is the same. Some languages like to add "nativekey" - a localized alternative to the original key. Lastly, add any number of alternative names for the key to the "also known as" (aliases) column. Some tools use aliases to offer a quick key search.

Copiable example with only required and suggested parameters

{{KeyDescription
| key           = 
| image         = 
| description   = 
| group         = 
| onNode        = 
| onWay         = 
| onArea        = 
| onRelation    = 
| requires      = 
| implies       = 
| combination   = 
| seeAlso       = 
| status        = 
| statuslink    = 
}}

Usage

Full parameter set in vertical format
Vertical list Prerequisites Brief instructions/notes
{{KeyDescription
| key           = 
| nativekey     = 
| image         = 
| description   = 
| osmcarto-rendering      = 
| osmcarto-rendering-size = 
| group         = 
| website       = 
| url_pattern   = 
| onNode        = 
| onWay         = 
| onArea        = 
| onRelation    = 
| requires      = 
| implies       = 
| combination   = 
| seeAlso       = 
| status        = 
| statuslink    = 
}}
 
 
 
 
 
 
rendered icon
 
 
website
 
 
 
 
 
 
 
 
 
status
 
 
 
The key name in native language
 
 
May not work if osmcarto-rendering-size is not set
Usually 14
 
 
 
 
 
 
 
 
 
 
 
 
 

If a field name is listed in the prerequisites column it is a prerequisite for the field to the left.

Parameters

The following parameters are recognised:

Feature description

  • key: the key being described (required).
  • nativekey: the key name in native language.
  • image: the name of an image to be used to illustrate the feature. For better code readability, it is recommended to copy the page title from the file page instead of from URL:
    Green tick.svg File:OpenStreetMap logo 2011 - social circle.svg (the same as the file page title)
    Red x.svg File:OpenStreetMap_logo_2011_-_social_circle.svg (use spaces instead of underscores)
    Red x.svg Image:OpenStreetMap_logo_2011_-_social_circle.svg (use File: instead of Image:)
  • description: a short description of the feature in question. Description is preferable to a single word, as it reduces chances for miscommunication - author of a definition is unable to assess whatever one specific word is ambiguous to all readers. Should start with a capital letter and end with a period. Must not contain any wiki markup or HTML. Must be less than 250 symbols. (required)
  • osmcarto-rendering: icon in the standard tile layer
  • osmcarto-rendering-size: size of the icon in pixels (usually 14)
  • group: the name of the broader group or category to which this feature belongs (optional). Use lower case.
  • website: the main website(s) associated with this feature (optional).
  • url_pattern: pattern to generate deep-link URLs for instances of this feature (optional).

Feature usage

The following parameters are optional. They are however recommended as their absence means that these uses have still not been decided or the use of the tag is still experimental.

  • onNode: yes if the feature being described is suitable for use on node elements, no otherwise.
  • onWay: yes if the feature being described is suitable for use on linear (non-area) way elements, no otherwise.
  • onArea: yes if the feature being described is suitable for use on area elements, no otherwise.
  • onRelation: yes if the feature being described is suitable for use on (non-multipolygon) relation elements.

Additional information

  • requires: a list of tags which are necessary (often higher/lower in hierarchy) for this tag and must be set to give its actual meaning (optional)
  • implies: a list of tags/values which are assumed when absent; see below for examples; tag them explicitly for exceptions (optional)
  • combination: a list of additional tags which are useful in combination with this one (optional); see below for examples
  • seeAlso: references to additional pages which may be of interest (optional)
  • status: the approval status of this feature (should be filled in); possible values include:
  • approved: the key or tag has successfully completed the approval process
  • de facto: the tag is in widespread use, and while it was not approved in a proposal process, it has a widespread acceptance among mappers (2)
  • deprecated: deprecated tags that are discouraged from being used
  • discardable: tags that are so useless that editors remove them automatically, for example Tag:odbl=clean
  • imported is used for a tag which was added from an external database
  • in use: the key or tag is in use (2)
  • obsolete: a key or tag which is no longer found in the database
  • proposed: the key or tag has been proposed to be used (but not yet approved) and usage of this tagging is minimal (1)
  • undefined or  (empty): unclear situation (this may be actually useful in case where data item has invalid value and it is not entirely clear which one should be used and someone is not interested in editing data items)
  • voting: the key or tag is currently being voted on as part of the approval process

Notes:

  1. By "usage of this tagging is minimal" it is meant that there is minimal usage world wide, for example a tag that has been used 50 times. Note that depending on the tag low usage may be normal, generally properties will have a much higher usage than specific features.
  2. in use and de facto can be used for tags that are in use but have proposal in some stage that was not approved. For example, a heavily used tag with rejected proposal can have de facto status.
  3. inuse was sometimes applied instead in use, the same with defacto instead of de facto. It is highly preferable to avoid this.
  • statuslink: name of the proposal page, for linking

Language support

  • lang: (optional) the BCP 47 language tag (most often based on a ISO 639-1 alpha-2 language code, or ISO 639-2 alpha-3 technical language code, or ISO 639-3 alpha-3 language code otherwise, possibly followed by script/region/variant subtags) for the language used to document this feature: this will generate aspects of the description box in the specified language, if translations are available. If a language code is not specified, the default will be determined from the full name of the current page using {{Langcode}}.

Advanced formatting parameters

These parameters can generally be ignored by the majority of users. They are available for fine-tuning the presentation of the description box, and are useful for including in examples, or embedding in tutorial pages.

  • class: specify the CSS class of the HTML table used to form the description box.
  • float: specify the CSS float value of the table: set to none to disable the standard right float.
  • style: the CSS style to be applied to the HTML table: overrides |float= if present.
  • languagelinks: set to no to inhibit links to corresponding pages in other languages (used for example on this documentation page).

Examples

Note: In these examples, long lines have been wrapped for convenience. The advanced formatting parameters, class, float, style and languagelinks are not show, as their values are specific to use as examples.

{{KeyDescription
| key         = dessert
| image       = 
| description = A dessert is a sweet dish, typically served towards the end of a meal.
| group       = cuisine
| onNode      = yes
| onWay       = no
| onArea      =
| onRelation  = yes
| requires    =
| implies     =
* {{Tag|edible||yes}}
| combination =
* {{Tag|meal|dinner}}
* {{Tag|sweet||yes}}
| seeAlso     =
* {{Tag|dessert|cheesecake}}
* {{Tag|dessert|gateau}}
| status      = imaginary
| lang        = en
}}
Public-images-osm logo.svg dessert
Description
A dessert is a sweet dish, typically served towards the end of a meal.
Group: cuisine
Used on these elements
may be used on nodesshould not be used on waysuse on areas unspecifiedmay be used on relations
Implies
Useful combination
See also
Status: imaginary
{{KeyDescription
| key         = shop
| image       = File:Geograph shop.jpg
| description = Место розничной торговли или оказания услуг.
| group       = 
| onNode      = yes
| onWay       = no
| onArea      = yes
| onRelation  = no
| requires    =
| implies     = 
| combination =
* {{Tag|name}}
* {{Tag|opening_hours}}
| seeAlso     = 
| status      = de facto
| lang        = ru
}}
Public-images-osm logo.svg shop
Geograph shop.jpg
Описание
Место розничной торговли или оказания услуг. Изменить или перевести это описание.
Группа: магазины
Используется на элементах
точки можно отмечать этим тегомлинии не принято отмечать этим тегомполигоны можно отмечать этим тегомотношения не принято отмечать этим тегом
Полезные сочетания
Статус: де-фактоPage for proposal
{{KeyDescription
| key         = openplaques:id
| description = For plaques listed on OpenPlaques.org.
| website     = http://openplaques.org/
| url_pattern = http://openplaques.org/plaques/[value]
| group       = historic
| onNode      = yes
| onWay       = no
| onArea      = no
| requires    =
* {{Tag|memorial|plaque}}
| implies     =
* {{Tag|historic|memorial}}
| combination =
* {{Tag|name}}
| seeAlso     =
| status      = undefined
| lang        = en
}}
Public-images-osm logo.svg openplaques:id
Open Plaques.svg
Description
For plaques listed on OpenPlaques.org. Show/edit corresponding data item.
Group: historic
Website
http://openplaques.org/
URL pattern
http://openplaques.org/plaques/[value]
Used on these elements
may be used on nodesshould not be used on waysshould not be used on areasshould not be used on relations (except multipolygon relations)
Requires
Implies
Useful combination
Status: undefined

TemplateData

This is the TemplateData for this template used by VisualEditor.
TemplateData for KeyDescription

This template provides a description box suitable for keys.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
keykey

key of the feature

Example
highway
Stringrequired
imageimage

image of the feature

Example
File:...
Filesuggested
descriptiondescription

a short description of the feature

Stringrequired
groupgroup

The name of the broader group to which this feature belongs. Please use lower-case names from Category:Features or from your namespaced (Category:DE:Features) or l10n version.

Example
amenities
Page namesuggested
onNodeonNode

If the feature can be used on a node.

Example
yes, no
Stringsuggested
onWayonWay

If the feature can be used on a way.

Example
yes, no
Stringsuggested
onAreaonArea

If the feature can be used on a way.

Example
yes, no
Stringsuggested
onRelationonRelation

If the feature can be used on a relation.

Example
yes, no
Booleansuggested
requiresrequires

A list of tag(s) which are necessary (often higher/lower in hierarchy) for this tag and must be set to give its actual meaning

Example
* {{Tag|key name|value}}
Contentsuggested
impliesimplies

A list of tag(s) that the feature implies in its defention.

Example
* {{Key|paved}} * {{Key|vehicle}}
Contentsuggested
combinationcombination

A bulleted-list of example tag(s) that can be used in combination with this feature.

Example
* {{Key|surface}} * {{Key|lit}}
Unknownsuggested
seeAlsoseeAlso

a list of similar tags

Example
{{Key|cycleway}}
Stringsuggested
statusstatus

The [[approval status]] of this feature

Suggested values
approved de facto deprecated discardable in use obsolete proposed undefined voting
Example
approved, de facto, deprecated, discardable, in use, obsolete, proposed, undefined, voting
Linesuggested
statuslinkstatuslink

The name of the proposal page, for linking.

Page namesuggested
languagelang

the ISO 639-2 code for the language used to document this feature: this will generate aspects of the description box in the specified language, if translations are available. If not set, language of page or namespace will be used.

Example
es, de
Unknownoptional
classclass

the CSS class of the HTML table used to form the description box

Stringoptional
floatfloat

the CSS float value of the table: set to none to disable the standard right float

Example
left, right, none
Stringoptional
stylestyle

the CSS style to be applied to the HTML table

Stringoptional
osmcarto-renderingosmcarto-rendering

an image showing a suggested rendering on a map; alternatively a page name/anchor to link to more detailed description

Fileoptional
osmcarto-rendering-sizeosmcarto-rendering-size

The size of the image set in osmcarto-rendering

Example
28px
Stringoptional
osmcarto-rendering-nodeosmcarto-rendering-node

an image showing a suggested rendering on a map for a node object; alternatively a page name/anchor to link to more detailed

Fileoptional
osmcarto-rendering-node-sizeosmcarto-rendering-node-size

The size of the image set in osmcarto-rendering-node

Example
28px
Stringoptional
osmcarto-rendering-wayosmcarto-rendering-way

an image showing a suggested rendering on a map for a node object; alternatively a page name/anchor to link to more detailed

Fileoptional
osmcarto-rendering-way-sizeosmcarto-rendering-way-size

The size of the image set in osmcarto-rendering-way

Example
28px
Stringoptional
osmcarto-rendering-areaosmcarto-rendering-area

an image showing a suggested rendering on a map for a node object; alternatively a page name/anchor to link to more detailed

Fileoptional
osmcarto-rendering-area-sizeosmcarto-rendering-area-size

The size of the image set in osmcarto-rendering-area

Example
28px
Stringsuggested
url_pattern (URI)url_pattern

URI (URL / URN) of the web resource; URL pattern; URI template from which $1 can be automatically replaced with the effective property value on items.

Example
https://www.wikidata.org/entity/$1
URLoptional
languagelinkslanguagelinks

If the langauge links should appear

Example
no
Lineoptional

Multipolygons, ways which are not areas and other traps

Main article: Template:Description/doc/confusion caused by use on onArea parameter

See also