Proposal:Composite Tag: Difference between revisions

From OpenStreetMap Wiki
Jump to navigation Jump to search
Content deleted Content added
Goldfndr (talk | contribs)
Refer to approved conditional restrictions
Goldfndr (talk | contribs)
withdraw delete suggestion, as it's currently used
Line 1: Line 1:
{{delete proposal}}

Composite tags can be used to add [[Conditional restrictions|time or vehicle class restrictions]] to a tag.
Composite tags can be used to add [[Conditional restrictions|time or vehicle class restrictions]] to a tag.


Line 72: Line 70:
|-
|-
| {{IconWay}}
| {{IconWay}}
|}
== Statistics ==
{|
|-
| {{#tag:osmtaginfo||rtype=composite_Attribute}} || {{#tag:osmtaginfo||rtype=composite_attribute}}
|}
|}
== See also ==
== See also ==

Revision as of 21:16, 10 March 2013

Composite tags can be used to add time or vehicle class restrictions to a tag.

For example:

no cycling 1000 to 1630 no HGVs 2200-0600

They could also be used to create every imaginable grouping of tags, or "structured tags". (This was indeed discusssed when relations generally were still at the "proposal" stage and were called "entities".) For example, if you have a road with an adjoining footway (or cycleway) and you don't map them as individual ways, then you lose the ability of giving differing attributes to the road and the footway. Say the road was asphalted but the surface on the footway was gravel, how would you express that? People have suggested various kinds of tag structuring, like

surface:road=asphalt
surface:footway=gravel

or

surface=road:asphalt,footway:gravel

It is, however, also possible to - while not creating a separate geometry for the footway - to create a separate object representing the footway which then contains all the tags which apply only to the footway. So you would have the way describing the road:

Way #123456
highway=secondary
surface=asphalt
oneway=true
nodes=345,789,333,777,444...

and you could use a relation as a generic tag container object to group the footway specific information:

Relation #55434
highway=footway
surface=gravel
oneway=false

The remaining question is how to link this relation to the way in question. The most straightforward way would be a forward link from the way to the relation, like a tag that contains a relation value: "footway_left=#55434". Since this is not supported, we would have to add a backlink from the relation, such as:

Relation #55434
highway=footway
surface=gravel
oneway=false
members: role=left_of,type=way,id=55434

(Or, perhaps, a better role description...)

Tags

The tags field holds key/value pairs for all the required tags, frequently a period of applicability or time of applicability and the tag(s) to which the restriction should be applied.

Key Value Discussion
type composite_Attribute
note

Members

A list of the ways to which this composite tag applies

Way or Node
way

Statistics

See also

Conditional restrictions, useful for the "no cycling 1000 to 1630 no HGVs 2200-0600" idea