Template:ValueDescription/doc: Difference between revisions
→Usage: removed specialty params to avoid their proliferation on regular wiki pages |
|||
| (63 intermediate revisions by 13 users not shown) | |||
| Line 1: | Line 1: | ||
{{Languages|Template:ValueDescription/doc}} |
|||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
{{Heavily used template}} |
{{Heavily used template}} |
||
=== Intro === |
=== Intro === |
||
This template provides a description box suitable for key/value pairs. |
This template provides a description box suitable for key/value pairs. Unfilled parameters are using corresponding [[Data items|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 |
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. |
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. |
||
All data item logic is done by [[Module:DescriptionFromDataItem]] |
* All data item logic is done by Lua code in [[Module:DescriptionFromDataItem]]. |
||
* Displaying and styling is done by [[Template:Description]]. |
|||
==== Copiable example with only required and suggested parameters ==== |
|||
<pre> |
|||
{{ValueDescription |
|||
| key = |
|||
| value = |
|||
| image = |
|||
| description = |
|||
| group = |
|||
| onNode = |
|||
| onWay = |
|||
| onArea = |
|||
| onRelation = |
|||
| requires = |
|||
| implies = |
|||
| combination = |
|||
| seeAlso = |
|||
| status = |
|||
| statuslink = |
|||
}} |
|||
</pre> |
|||
=== Usage === |
=== Usage === |
||
{|class="wikitable" |
{|class="wikitable" |
||
| Line 25: | Line 45: | ||
| value = |
| value = |
||
| image = |
| image = |
||
| image_caption = |
|||
| description = |
| description = |
||
| osmcarto-rendering = |
| osmcarto-rendering = |
||
| osmcarto-rendering-size = |
| 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 = |
| group = |
||
| onNode = |
| onNode = |
||
| Line 40: | Line 65: | ||
| status = |
| status = |
||
| statuslink = |
| statuslink = |
||
| wikidata = |
|||
}} |
}} |
||
</pre> |
</pre> |
||
| Line 49: | Line 73: | ||
|
|
||
|
|
||
|
|||
image |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
||
|
|
||
| Line 99: | Line 128: | ||
* '''key''': the key being described |
* '''key''': the key being described |
||
* '''value''': the value 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_caption''': the description of the image to be used to illustrate the feature (optional) |
|||
* '''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: |
|||
* '''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 |
|||
*: [[File:Green tick.svg|10px]] {{kbd|File:OpenStreetMap logo 2011 - social circle.svg}} (the same as the file page title) |
|||
* '''osmcarto-rendering''': to show the osmcarto rendering (use <code>osmcarto-rendering-size</code> at the same time) |
|||
*: [[File:Red x.svg|10px]] {{kbd|File:OpenStreetMap_logo_2011_-_social_circle.svg}} (use spaces instead of underscores) |
|||
* '''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. 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. |
|||
*: [[File:Red x.svg|10px]] {{kbd|Image:OpenStreetMap_logo_2011_-_social_circle.svg}} (use {{kbd|File:}} instead of {{kbd|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 <code>osmcarto-rendering</code> 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 <code>osmcarto-rendering-node</code> 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 <code>osmcarto-rendering-way</code> 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 <code>osmcarto-rendering-area</code> 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 ==== |
==== Feature usage ==== |
||
* '''onNode''': <code>yes</code> if the feature being described is suitable for use on node elements, <code>no</code> otherwise |
* '''onNode''': <code>yes</code> if the feature being described is suitable for use on node elements, <code>no</code> otherwise |
||
* '''onWay''': <code>yes</code> if the feature being described is suitable for use on ( |
* '''onWay''': <code>yes</code> if the feature being described is suitable for use on linear (non-area) way elements, <code>no</code> otherwise |
||
* '''onArea''': <code>yes</code> if the feature being described is suitable for use on area elements, <code>no</code> otherwise |
* '''onArea''': <code>yes</code> if the feature being described is suitable for use on [[area]] elements, <code>no</code> otherwise |
||
* '''onRelation''': <code>yes</code> if the feature being described is suitable for use on (non-multipolygon) relation elements, <code>no</code> otherwise |
* '''onRelation''': <code>yes</code> if the feature being described is suitable for use on (non-multipolygon) relation elements, <code>no</code> otherwise |
||
==== Additional information ==== |
==== Additional information ==== |
||
<!-- remember to edit also https://wiki.openstreetmap.org/wiki/Template:KeyDescription/doc#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; |
|||
* ''' |
* '''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; possible values include: |
|||
* '''status''': the [[Approval_status|approval status]] of this feature (should be filled in); possible values include: |
|||
** <code>inuse</code>: the feature is in use |
|||
{{Tag status values}} <!-- editable at https://wiki.openstreetmap.org/wiki/Template:Tag_status_values --> |
|||
** <code>approved</code>: the feature has successfully competed the approval process |
|||
** <code>rejected</code>: the feature was rejected during the approval process |
|||
** <code>voting</code>: the feature is currently being voted on as part of the approval process |
|||
** <code>proposed</code>: the feature has been formally proposed |
|||
** <code>draft</code>: the feature has a draft proposal being written |
|||
** <code>abandoned</code>: the approval process for this feature has been terminated before completion |
|||
** <code>defacto</code>: the tag is in widespread use, but no formal proposal process has taken place |
|||
* '''statuslink''': name of the proposal page, for linking |
* '''statuslink''': name of the proposal page, for linking |
||
* '''wikidata''': the equivalent, top-level, item on [[Wikidata]] |
|||
==== Language support ==== |
==== Language support ==== |
||
| Line 140: | Line 173: | ||
=== Examples === |
=== 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.'' |
''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.'' |
||
<pre style="float:left;margin:2px 0;width:30em"> |
|||
{{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 |
|||
}}</pre> |
|||
{{ValueDescription |
|||
|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 |
|||
| lang = en |
|||
| class = |
|||
| float = right |
|||
| style = |
|||
| languagelinks = no |
|||
|debug=yes}}{{clear|both}} |
|||
<pre style="float:left;margin:2px 0;width:30em"> |
<pre style="float:left;margin:2px 0;width:30em"> |
||
| Line 146: | Line 236: | ||
| key = dessert |
| key = dessert |
||
| value = cheesecake |
| value = cheesecake |
||
| image |
| image = File:Italian style cheesecake.jpg |
||
| image_caption = A slice of cheesecake. |
|||
| description = Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer. |
| description = Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer. |
||
| onNode = yes |
| onNode = yes |
||
| Line 162: | Line 251: | ||
* {{tag|sweet|yes}} |
* {{tag|sweet|yes}} |
||
| seeAlso = The {{tag|dessert|gateau}} tag is sometimes confused with this one. |
| seeAlso = The {{tag|dessert|gateau}} tag is sometimes confused with this one. |
||
| status = |
| status = |
||
| lang = en |
| lang = en |
||
}}</pre> |
}}</pre> |
||
| Line 169: | Line 258: | ||
| key = dessert |
| key = dessert |
||
| value = cheesecake |
| value = cheesecake |
||
| image |
| image = File:Italian style cheesecake.jpg |
||
| image_caption = A slice of cheesecake. |
| image_caption = A slice of cheesecake. |
||
| description = Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer. |
| description = Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer. |
||
| Line 185: | Line 274: | ||
* {{tag|sweet|yes}} |
* {{tag|sweet|yes}} |
||
| seeAlso = The {{tag|dessert|gateau}} tag is sometimes confused with this one. |
| seeAlso = The {{tag|dessert|gateau}} tag is sometimes confused with this one. |
||
| status = |
| status = |
||
| lang = en |
| lang = en |
||
| class = |
| class = |
||
| Line 198: | Line 287: | ||
| key = highway |
| key = highway |
||
| value = residential |
| value = residential |
||
| image = |
| image = File:Residential.jpg |
||
| description = Road in a residential area |
| description = Road in a residential area |
||
| onNode = no |
| onNode = no |
||
| Line 209: | Line 298: | ||
| implies = |
| implies = |
||
| seeAlso = |
| seeAlso = |
||
| status = |
| status = approved |
||
| lang = |
| lang = |
||
}}</pre> |
}}</pre> |
||
| Line 216: | Line 305: | ||
| key = highway |
| key = highway |
||
| value = residential |
| value = residential |
||
| image = |
| image = File:Residential.jpg |
||
| description = Road in a residential area |
| description = Road in a residential area |
||
| onNode = no |
| onNode = no |
||
| Line 227: | Line 316: | ||
| implies = |
| implies = |
||
| seeAlso = |
| seeAlso = |
||
| status = |
| status = approved |
||
| lang = |
| lang = |
||
| class = |
| class = |
||
| Line 240: | Line 329: | ||
| key = power |
| key = power |
||
| value = generator |
| value = generator |
||
| image = File:Kraftwerk Staudinger |
| image = File:Kraftwerk Staudinger von Limes-B.jpg |
||
| description = Kraftwerk - dient der Erzeugung von Strom oder Wärme |
| description = Kraftwerk - dient der Erzeugung von Strom oder Wärme |
||
| onNode = yes |
| onNode = yes |
||
| Line 283: | Line 372: | ||
|debug=yes}}{{Clear|both}} |
|debug=yes}}{{Clear|both}} |
||
=== |
=== TemplateData === |
||
* {{tl|Description}} |
|||
* {{tl|KeyDescription}} |
|||
* {{tl|RelationDescription}} |
|||
<templatedata> |
|||
{ |
|||
"params": { |
|||
"key": { |
|||
"description": "key of the tag", |
|||
"example": "highway", |
|||
"required": true, |
|||
"type": "string" |
|||
}, |
|||
"value": { |
|||
"description": "value of the tag", |
|||
"example": "residential", |
|||
"required": true, |
|||
"type": "string" |
|||
}, |
|||
"image": { |
|||
"description": "image of the feature", |
|||
"example": "File:...", |
|||
"suggested": true, |
|||
"type": "wiki-file-name" |
|||
}, |
|||
"description": { |
|||
"description": "a short description of the feature", |
|||
"required": true, |
|||
"type": "string" |
|||
}, |
|||
"type": { |
|||
"description": "The type of this feature page", |
|||
"example": "key, value", |
|||
"type": "string" |
|||
}, |
|||
"onNode": { |
|||
"description": "If the feature can be used on a node.", |
|||
"suggested": true, |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"yes", |
|||
"no" |
|||
] |
|||
}, |
|||
"onWay": { |
|||
"description": "If the feature can be used on a way.", |
|||
"suggested": true, |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"yes", |
|||
"no" |
|||
] |
|||
}, |
|||
"onRelation": { |
|||
"description": "If the feature can be used on a relation.", |
|||
"suggested": true, |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"yes", |
|||
"no" |
|||
] |
|||
}, |
|||
"combination": { |
|||
"description": "A bulleted-list of example tag(s) that can be used in combination with this feature.", |
|||
"example": "* {{Tag|surface|asphalt}} * {{Tag|lit|yes}}", |
|||
"type": "content", |
|||
"suggested": true |
|||
}, |
|||
"implies": { |
|||
"description": "A list of tag(s) that the feature implies in its defention.", |
|||
"example": "* {{Tag|paved|yes}} * {{Tag|vehicle|yes}}", |
|||
"type": "content", |
|||
"suggested": true |
|||
}, |
|||
"seeAlso": { |
|||
"description": "a list of similar tags", |
|||
"example": "{{Tag|highway|motorway}}", |
|||
"type": "content", |
|||
"suggested": true |
|||
}, |
|||
"status": { |
|||
"description": "The approval status of this feature", |
|||
"example": "in use", |
|||
"suggested": true, |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"approved", |
|||
"de facto", |
|||
"deprecated", |
|||
"discardable", |
|||
"in use", |
|||
"obsolete", |
|||
"proposed", |
|||
"voting" |
|||
] |
|||
}, |
|||
"lang": { |
|||
"label": "language", |
|||
"example": "es, de", |
|||
"description": "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" |
|||
}, |
|||
"class": { |
|||
"description": "the CSS class of the HTML table used to form the description box", |
|||
"type": "string" |
|||
}, |
|||
"float": { |
|||
"description": "the CSS float value of the table: set to none to disable the standard right float", |
|||
"example": "left, right, none", |
|||
"type": "string" |
|||
}, |
|||
"style": { |
|||
"description": "the CSS style to be applied to the HTML table", |
|||
"type": "string" |
|||
}, |
|||
"statuslink": { |
|||
"description": "The name of the proposal page, for linking.", |
|||
"type": "wiki-page-name", |
|||
"suggested": true |
|||
}, |
|||
"osmcarto-rendering": { |
|||
"description": "an image showing a suggested rendering on a map; alternatively a page name/anchor to link to more detailed description", |
|||
"type": "wiki-file-name" |
|||
}, |
|||
"osmcarto-rendering-size": { |
|||
"description": "The size of the image set in osmcarto-rendering", |
|||
"example": "28px", |
|||
"type": "string" |
|||
}, |
|||
"osmcarto-rendering-node": { |
|||
"description": "an image showing a suggested rendering on a map for a node object; alternatively a page name/anchor to link to more detailed", |
|||
"type": "wiki-file-name" |
|||
}, |
|||
"osmcarto-rendering-node-size": { |
|||
"description": "The size of the image set in osmcarto-rendering-node", |
|||
"example": "28px", |
|||
"type": "string" |
|||
}, |
|||
"osmcarto-rendering-way": { |
|||
"description": "an image showing a suggested rendering on a map for a node object; alternatively a page name/anchor to link to more detailed", |
|||
"type": "wiki-file-name" |
|||
}, |
|||
"osmcarto-rendering-way-size": { |
|||
"description": "The size of the image set in osmcarto-rendering-way", |
|||
"example": "28px", |
|||
"type": "string" |
|||
}, |
|||
"osmcarto-rendering-area": { |
|||
"description": "an image showing a suggested rendering on a map for a node object; alternatively a page name/anchor to link to more detailed", |
|||
"type": "wiki-file-name" |
|||
}, |
|||
"osmcarto-rendering-area-size": { |
|||
"description": "The size of the image set in osmcarto-rendering-area", |
|||
"example": "28px", |
|||
"type": "string" |
|||
}, |
|||
"group": { |
|||
"description": "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", |
|||
"suggested": true, |
|||
"type": "wiki-page-name" |
|||
}, |
|||
"onArea": { |
|||
"description": "If the feature can be used on a way.", |
|||
"suggested": true, |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"yes", |
|||
"no" |
|||
] |
|||
}, |
|||
"requires": { |
|||
"description": "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}}", |
|||
"type": "content", |
|||
"suggested": true |
|||
}, |
|||
"languagelinks": { |
|||
"description": "If the langauge links should appear", |
|||
"example": "no", |
|||
"type": "string" |
|||
} |
|||
}, |
|||
"description": "This template provides a description box suitable for key/value pairs.", |
|||
"format": "block", |
|||
"paramOrder": [ |
|||
"key", |
|||
"value", |
|||
"image", |
|||
"description", |
|||
"group", |
|||
"onNode", |
|||
"onWay", |
|||
"onArea", |
|||
"onRelation", |
|||
"requires", |
|||
"implies", |
|||
"combination", |
|||
"seeAlso", |
|||
"status", |
|||
"statuslink", |
|||
"lang", |
|||
"class", |
|||
"float", |
|||
"style", |
|||
"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", |
|||
"languagelinks", |
|||
"type" |
|||
] |
|||
} |
|||
</templatedata> |
|||
=== Multipolygons, ways which are not areas and other traps === |
|||
{{main|Template:Description/doc/confusion caused by use on onArea parameter}} |
|||
=== See also === |
|||
* {{t|Description}} - styling is handled here |
|||
* {{t|KeyDescription}} |
|||
* {{T|KeyPrefixDescription}} |
|||
* {{t|RelationDescription}} |
|||
<includeonly> |
<includeonly> |
||
[[Category:Templates|ValueDescription]] |
[[Category:Templates|ValueDescription]] |
||
Latest revision as of 17:23, 8 June 2024
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.
- All data item logic is done by Lua code in Module:DescriptionFromDataItem.
- Displaying and styling is done by Template:Description.
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
| 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:
- 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-renderingis 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-nodeis 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-wayis 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-areais 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:
yesif the feature being described is suitable for use on node elements,nootherwise - onWay:
yesif the feature being described is suitable for use on linear (non-area) way elements,nootherwise - onArea:
yesif the feature being described is suitable for use on area elements,nootherwise - onRelation:
yesif the feature being described is suitable for use on (non-multipolygon) relation elements,nootherwise
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 processde 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 useddiscardable: tags that are so useless that editors remove them automatically, for example Tag:odbl=cleanimportedis used for a tag which was added from an external database, see also Import detailsin use: the key or tag is in use (2)obsolete: a key or tag which is no longer found in the databaseproposed: the key or tag has been proposed to be used (but not yetapproved) and usage of this tagging is minimal (1)undefinedor(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:
- 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.
in useandde factocan 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 havede factostatus.
- 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
noneto disable the standard right float - style: the CSS style to be applied to the HTML table: overrides
|float=if present - languagelinks: set to
noto 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
}}
| Description |
|---|
| A police station is a building which police officers patrol from and that is a first point of contact for civilians. |
| Rendering in OSM Carto |
| Rendering in OSM Carto |
| Rendering in OSM Carto |
| Group: amenities |
| Used on these elements |
| Useful combination |
| See also |
|
|
| Status: de facto |
| Tools for this tag |
- (debug) Category:Tag descriptions for group "amenities", sorted as "amenity police".
- (debug) Category:Tag descriptions for key "amenity", sorted as "police".
- (debug) Category:Tag descriptions, sorted as "amenity police".
- (debug) Category:Tag descriptions by value, sorted as "police amenity".
- (debug) Category:Tag descriptions with status "de facto", sorted as "amenity police".
{{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
}}
| Description |
|---|
| Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer. |
| Used on these elements |
| Requires |
|
Good quality cheese |
| Implies |
| Useful combination |
| See also |
| Status: undefined |
| Tools for this tag |
- (debug) Category:Tag descriptions by group, sorted as "dessert cheesecake".
- (debug) Category:Tag descriptions by key, sorted as "dessert cheesecake".
- (debug) Category:Tag descriptions, sorted as "dessert cheesecake".
- (debug) Category:Tag descriptions by value, sorted as "cheesecake dessert".
- (debug) Category:Tag descriptions with no status specified, sorted as "dessert cheesecake".
- (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 =
}}
| Description |
|---|
| Road in a residential area |
| Rendering in OSM Carto |
|
| Group: highways |
| Used on these elements |
| Useful combination |
| See also |
| Status: approved |
| Tools for this tag |
- (debug) Category:Tag descriptions for group "highways", sorted as "highway residential".
- (debug) Category:Tag descriptions for key "highway", sorted as "residential".
- (debug) Category:Tag descriptions, sorted as "highway residential".
- (debug) Category:Tag descriptions by value, sorted as "residential highway".
- (debug) Category:Tag descriptions with status "approved", sorted as "highway residential".
{{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
}}
| Beschreibung |
|---|
| Kraftwerk - dient der Erzeugung von Strom oder Wärme |
| Darstellung in OSM Carto |
|
| Gruppe: Energie |
| Für diese Elemente |
| Sinnvolle Kombinationen |
| Status: akzeptiert |
| Werkzeuge für dieses Attribut |
|
- (debug) Category:DE:Beschreibungen der Attribute für Gruppe "Energie", sorted as "power generator".
- (debug) Category:DE:Beschreibungen der Attribute für Schlüssel "power", sorted as "generator".
- (debug) Category:DE:Beschreibungen der Attribute, sorted as "power generator".
- (debug) Category:DE:Beschreibungen der Attribute nach Wert, sorted as "generator power".
- (debug) Category:DE:Beschreibungen der Attribute mit Status "akzeptiert", sorted as "power generator".
TemplateData
This template provides a description box suitable for key/value pairs.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| key | key | key of the tag
| String | required |
| value | value | value of the tag
| String | required |
| image | image | image of the feature
| File | suggested |
| description | description | a short description of the feature | String | required |
| group | group | 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.
| Page name | suggested |
| onNode | onNode | If the feature can be used on a node.
| String | suggested |
| onWay | onWay | If the feature can be used on a way.
| String | suggested |
| onArea | onArea | If the feature can be used on a way.
| String | suggested |
| onRelation | onRelation | If the feature can be used on a relation.
| String | suggested |
| requires | requires | 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
| Content | suggested |
| implies | implies | A list of tag(s) that the feature implies in its defention.
| Content | suggested |
| combination | combination | A bulleted-list of example tag(s) that can be used in combination with this feature.
| Content | suggested |
| seeAlso | seeAlso | a list of similar tags
| Content | suggested |
| status | status | The approval status of this feature
| String | suggested |
| statuslink | statuslink | The name of the proposal page, for linking. | Page name | suggested |
| language | 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
| Unknown | optional |
| class | class | the CSS class of the HTML table used to form the description box | String | optional |
| float | float | the CSS float value of the table: set to none to disable the standard right float
| String | optional |
| style | style | the CSS style to be applied to the HTML table | String | optional |
| osmcarto-rendering | osmcarto-rendering | an image showing a suggested rendering on a map; alternatively a page name/anchor to link to more detailed description | File | optional |
| osmcarto-rendering-size | osmcarto-rendering-size | The size of the image set in osmcarto-rendering
| String | optional |
| osmcarto-rendering-node | osmcarto-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 | File | optional |
| osmcarto-rendering-node-size | osmcarto-rendering-node-size | The size of the image set in osmcarto-rendering-node
| String | optional |
| osmcarto-rendering-way | osmcarto-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 | File | optional |
| osmcarto-rendering-way-size | osmcarto-rendering-way-size | The size of the image set in osmcarto-rendering-way
| String | optional |
| osmcarto-rendering-area | osmcarto-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 | File | optional |
| osmcarto-rendering-area-size | osmcarto-rendering-area-size | The size of the image set in osmcarto-rendering-area
| String | optional |
| languagelinks | languagelinks | If the langauge links should appear
| String | optional |
| type | type | The type of this feature page
| String | optional |
Multipolygons, ways which are not areas and other traps
See also
- {{Description}} - styling is handled here
- {{KeyDescription}}
- {{KeyPrefixDescription}}
- {{RelationDescription}}





