Template:ValueDescription

From OpenStreetMap Wiki
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 key/value pairs. Unfilled parameters are using corresponding data item. If you see incorrect data you may need to correct it within or delete it from data item.

This template uses corresponding data item for some of the missing parameters (e.g. key, image, description, group, status, on*, ...), so in theory a blank template would still work. But parameters should not be deleted as there is no agreement to do this, especially in the main English version. Some translations of Wiki may have agreement to use data items instead, consult other editors if unsure.

To view or translate the data item, click the gray 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 tag (key=value, usually a lower case). 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" and "nativevalue" - a localized alternative to the original tag. 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

{{ValueDescription
| key           = 
| value         = 
| 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
{{ValueDescription
| key           = 
| value         = 
| image         = 
| description   = 
| osmcarto-rendering      = 
| osmcarto-rendering-size = 
| osmcarto-rendering-node = 
| osmcarto-rendering-node-size = 
| osmcarto-rendering-way = 
| osmcarto-rendering-way-size = 
| osmcarto-rendering-area = 
| osmcarto-rendering-area-size = 
| group         = 
| onNode        = 
| onWay         = 
| onArea        = 
| onRelation    = 
| requires      = 
| implies       = 
| combination   = 
| seeAlso       = 
| status        = 
| statuslink    = 
}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
status
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  • 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
  • value: the value being described
  • nativekey: translation of the key (for non-English pages)
  • nativevalue: translation of the value (for non-English pages)
  • 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.
  • osmcarto-rendering: an optional image (e.g. "File:Name.png") showing a suggested rendering on a map; alternatively a page name/anchor to link to more detailed description
  • osmcarto-rendering-size: if osmcarto-rendering is set, a size for an image (e.g. "28px" for an icon); or alternatively a short text displayed for the link to a detailed description
  • osmcarto-rendering-node: an optional image (e.g. "File:Name.png") showing a suggested rendering on a map for a node object; alternatively a page name/anchor to link to more detailed
  • osmcarto-rendering-node-size: if osmcarto-rendering-node is set, a size for an image (e.g. "28px" for an icon); or alternatively a short text displayed for the link to a detailed description
  • osmcarto-rendering-way: an optional image (e.g. "File:Name.png") showing a suggested rendering on a map for a way object; alternatively a page name/anchor to link to more detailed
  • osmcarto-rendering-way-size: if osmcarto-rendering-way is set, a size for an image (e.g. "100px" for an area(way)); or alternatively a short text displayed for the link to a detailed description
  • osmcarto-rendering-area: an optional image (e.g. "File:Name.png") showing a suggested rendering on a map for a area object; alternatively a page name/anchor to link to more detailed description
  • osmcarto-rendering-area-size: if osmcarto-rendering-area is set, a size for an image (e.g. "100px" for an area); or alternatively a short text displayed for the link to a detailed description
  • group: the name of the broader group to which this feature belongs. Please use names from Category:Features or from your namespaced (Category:DE:Features) or l10n version. Use lower case. Working example can be found in Tag:amenity=bbq and Category:Amenities. Namespaced category will be generated from Template:Feature. Just use template Template:Feature at your l10n page (for ex. DE:Busse) and it will create category Category:DE:Busse for you. Right now it works by creating namespaced categories, we need to further improve Template:Feature and add support for l10n names as parameter in Feature template.

Feature usage

  • 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, no otherwise

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: 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

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

Examples

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

{{ValueDescription
|type=value
|key=amenity
|value=police
|image=File:Met Police Blue Lamp.jpg
|description=A police station is a building which police officers patrol from and that is a first point of contact for civilians.
|osmcarto-rendering-node=File:Police-16.svg
|osmcarto-rendering-node-size=24px
|osmcarto-rendering-area=File:Area_police_fire_station.png
|osmcarto-rendering-area-size=100px
|onNode=yes
|onWay=no
|onArea=yes
|onRelation=no
|combination=
* {{Tag|name}}
* {{Tag|operator}}
* {{Tag|addr}}
* {{Tag|phone}}
* {{Tag|opening_hours}}
* {{Tag|website}}
|seeAlso={{tag|police}}
|status=de facto
|group=amenities
}}
Public-images-osm logo.svg amenity = police
Met Police Blue Lamp.jpg
Description
A police station is a building which police officers patrol from and that is a first point of contact for civilians. Edit this description in the wiki page. Edit this description in the data item.
Rendering in OSM Carto
Police-16.svg
Rendering in OSM Carto node
Police-16.svg
Rendering in OSM Carto area
Area police fire station.png
Group: amenities
Used on these elements
may be used on nodesshould not be used on waysmay be used on areas (and multipolygon relations)should not be used on relations (except multipolygon relations)
Useful combination
See also

police=*

Status: de facto


{{ValueDescription
| type          = value
| key           = dessert
| value         = cheesecake
| image = File:Italian style cheesecake.jpg
| description   = Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer.
| onNode        = yes
| onWay         = no
| onArea        = 
| onRelation    = yes
| requires      = Good quality cheese
| combination   =
* {{tag|meal|dinner}}
* {{tag|flavour|lemon}} 
* {{tag|origin|new_york}}
| implies       =
* {{tag|edible|yes}}  
* {{tag|sweet|yes}} 
| seeAlso       = The {{tag|dessert|gateau}} tag is sometimes confused with this one.
| status        = 
| lang          = en
}}
Public-images-osm logo.svg dessert = cheesecake
Italian style cheesecake.jpg
Description
Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer.
Used on these elements
may be used on nodesshould not be used on waysuse on areas unspecifiedmay be used on relations
Requires

Good quality cheese

Implies
Useful combination
See also

The dessert=gateau tag is sometimes confused with this one.

Status: undefined
  • (debug) [[:Category:]]
{{ValueDescription
| type          = value
| key           = highway
| value         = residential
| image         = File:Residential.jpg
| description   = Road in a residential area
| onNode        = no
| onWay         = yes
| onArea        = no
| onRelation    = 
| combination   =
* {{Key|name}}
* {{Key|oneway}}
| implies       = 
| seeAlso       = 
| status        = approved
| lang          = 
}}
Public-images-osm logo.svg highway = residential
Residential.jpg
Description
Road in a residential area Show/edit corresponding data item.
Rendering in OSM Carto
Rendering-highway residential.png
Group: highways
Used on these elements
should not be used on nodesmay be used on waysshould not be used on areasshould not be used on relations (except multipolygon relations)
Useful combination
See also
Status: approved
{{ValueDescription
| type          = value
| key           = power
| value         = generator
| image         = File:Kraftwerk Staudinger von Limes-B.jpg
| description   = Kraftwerk - dient der Erzeugung von Strom oder Wärme
| onNode        = yes
| onWay         = yes
| onArea        = yes
| onRelation    = 
| combination   =
* {{Key|generator:source|kl=DE}}
* {{Key|generator:method|kl=DE}}
* {{Key|generator:output|kl=DE}}
* {{Tag|name|kl=DE}}
* {{Tag|operator|kl=DE}}
| implies       = 
| seeAlso       = 
| status        = 
| lang          = de
}}
Public-images-osm logo.svg power = generator
Kraftwerk Staudinger von Limes-B.jpg
Beschreibung
Kraftwerk - dient der Erzeugung von Strom oder Wärme Beschreibung auf dieser Wikiseite bearbeiten Beschreibung im zugehörigen Datenelement bearbeiten
Darstellung in OSM Carto
Area power.png
Gruppe: Energie
Für diese Elemente
kann auf Punkte angewendet werdenkann auf Linien angewendet werdenkann auf Flächen (und Multipolygon-Relationen) angewendet werdensollte nicht auf Relationen angewendet werden (außer Multipolygon-Relationen)
Sinnvolle Kombinationen
Status: akzeptiertPage for proposal

TemplateData

This template provides a description box suitable for key/value pairs.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
keykey

key of the tag

Example
highway
Stringrequired
valuevalue

value of the tag

Example
residential
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.

Suggested values
yes no
Stringsuggested
onWayonWay

If the feature can be used on a way.

Suggested values
yes no
Stringsuggested
onAreaonArea

If the feature can be used on a way.

Suggested values
yes no
Stringsuggested
onRelationonRelation

If the feature can be used on a relation.

Suggested values
yes no
Stringsuggested
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|building|office}}
Contentsuggested
impliesimplies

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

Example
* {{Tag|paved|yes}} * {{Tag|vehicle|yes}}
Contentsuggested
combinationcombination

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

Example
* {{Tag|surface|asphalt}} * {{Tag|lit|yes}}
Contentsuggested
seeAlsoseeAlso

a list of similar tags

Example
{{Tag|highway|motorway}}
Contentsuggested
statusstatus

The approval status of this feature

Suggested values
approved de facto deprecated discardable in use obsolete proposed voting
Example
in use
Stringsuggested
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

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
Stringoptional
languagelinkslanguagelinks

If the langauge links should appear

Example
no
Stringoptional
typetype

The type of this feature page

Example
key, value
Stringoptional

Multipolygons, ways which are not areas and other traps

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

See also