Proposal talk:Composite Tag

From OpenStreetMap Wiki
Jump to navigation Jump to search

What is a Composite Tag? Is a Composite Tag a Relationship?

A tag is a property of an element (cf. Elements). A node or a way is a basic element. An area is a special form of a way (closed way, specially tagged). A relationship is a higher level element, because it relates two or more elements, which can be either basic or higher level elements. The relationship will have properties which are given as tags (cf. Relations).

Using this description I deduce that (a) a relationship relates at least two objects, that (b) tags are no elements, and that (c) tags can not be the object of a relationship, they are additional properties of a relationship. Thus a composite tag is not a relation(ship).

A composite tag is a set of properties which has to be interpreted together. For example, a way can have two speed limits: the first one is 80km/h and applies to all vehicles for the time 20:00-06:00, whereas the second one with 60 km/h applies only to hgv for the same time. For the rest of the day the usual speed limit of 100km/h for all vehicles and 80km/h for hgv applies. To represent this we have to use four groups of tags which will be properties of the way.

To introduce a composite tag to model these real world situations the OSM API has to be extended to add properties to an element not only using simple tags in a flat structure, but to add groups of simple tags forming composite tags to an element. --BerndR 09:08, 5 November 2007 (UTC)

- A relationship is currently the only way to reference other OSM Elements and assign a group of tags to one or more elements. Thus I change my view to a relation(ship) is the only possibility to describe a composite tag using the currect OSM data model :-). --BerndR 15:11, 18 January 2008 (UTC)

I agree to that. But I think it would be much better if the datamodel allowed composite tags in the future. Therefore the use of this relation should be very restrictive. --Rayx 14:17, 17 June 2008 (UTC)


Assigning a Group of Tags to a (Sub-)Section of a Way

Referencing a way and two nodes of this way, we can define a (sub-)section of a way. Assigning different roles to these two nodes and including a boolean tag directed, we can define the direction of this section. Using this directed or undirected section of a way, we can add a group of tags (= composite tag) to this section.

The same concept can be used to assign a group of tags (= composite tag) to a direction of the complete way. To achieve this, two nodes are referenced defining the direction and a boolean tag directed is included.

Example: A longer street has a default speed limit of 100km/h. Before each intersection the speed limit is changed to 70km/h which gets revoked after the intersection. Additionally a part of this street has a speed limit of 100km/h in one direction, but a speed limit of 70km/h in the opposite direction (because the street is declining).

- Normally you have to split the way each time the speed limit in one or both directions changes. This will lead to a lot of small ways. Now you can use the relation Relations/Proposed/Collected_Ways to recollect all these parts. Additionally it is currently not possible to tag a way with different speed limits (or lanes or other restrictions and properties) for the two directions of traffic flow.

- With the additional proposal you can keep the way as is and add a lot of relations for either an undirected section (if the speed limits in both directions are the same) or a directed section of the way (if the speed limits in both directions differ).

--BerndR 15:11, 18 January 2008 (UTC)

Are you describing Relations/Proposed/Segmented Tag? --Rayx 14:17, 17 June 2008 (UTC)

Delete ok?

Now that Conditional restrictions have been approved, is there any need to keep this? The most recent change expanded it far beyond the original intent. --goldfndr (talk) 21:05, 10 March 2013 (UTC)