NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

# What is a "role" in a relation?

 5 When creating a relation, what is a "role" and what do I put in that box? asked 06 Mar '11, 17:59 techlady 90●4●5●6 accept rate: 0%

 5 The meaning of "role" depends on the type of relation. Generally, the different members of a relation may have specific roles; the "role" is used to express this. Examples: If a relation describes a turn restriction, then the members will usually be two ways. The roles "from" and "to" are used to indicate the direction of the turn restriction. E.g. if turning from "main road" to "Lancaster road" is prohibited, you'd have relation members "from"="main road", "to=Lancaster road". The roles are important because turn restrictions often only apply in one direction. For multipolygons, roles are used to describe whether a single closed way is an "inner" or "outer" way. See the wiki for details: http://wiki.openstreetmap.org/wiki/Relation answered 07 Mar '11, 00:49 sleske 4.1k●13●56●78 accept rate: 24%
 4 The general idea is that while there might be relations where all members are of the same kind (e.g. a route relation that simply collects all pieces making up the I12345 or so), there could be other relations where it makes a huge difference in what role you participiate (for a simple example think of a hypothetical ownership relation in which you can either participate as the "owner" or as the "owned"). The roles that make sense in a given context (i.e. in a given relation type) are usually described in the relation detail; see links collected on the relations page on the wiki. answered 06 Mar '11, 18:26 Frederik Ramm ♦ 82.5k●92●720●1273 accept rate: 23% 1 Frederik, Wouldn't it be better if some of these things were defined, so those of us who are newer members aren't just making up our own system? I don't really care what the roles are. I just want someone to tell me what they are. For example, if I am tagging a state highway, what "roles" should I add? What is standard? If I'm creating a relation for national parks (or, more to the point, for a national forest that is broken into several sections that are separate geographically, a common occurrence), are there any roles or should I just leave that blank? Tell me what to do. Charlotte (25 Oct '12, 19:25) techlady 1 I think the main point is that the OSM Editor software (JOSM / Potlatch2) should automatically fill in the role when creating relations (e.g. for turn restrictions or a multi-polygon). However 'power' users can edit this value should they think it is necessary. E.g. in creating new kinds of relations not supported by editor presets or for fixing previously created but incorrect values. (29 Oct '12, 22:01) robbieonsea 1 Charlotte, when you are unsure about a role, just leave it empty. When you need to set a role, you will be told in the description of the specific relation what role to set. In both cases you mentioned (borders and route relations), it would be just fine to leave the roles empty. (30 Oct '12, 08:31) Roland Olbricht
 1 Additionally I think the main point is that the OSM Editor software (JOSM / Potlatch2) should automatically fill in the role when creating common relations (e.g. for turn restrictions or a multi-polygon). 'power' users can edit/set this value should they think it is necessary. E.g. in creating new kinds of relations not supported by editor presets or for fixing previously created but incorrect values. In much the same way as you can use any tag the value of the role can be anything. Some values for roles depends on the type of relation as noted in these wiki pages for common usage: http://wiki.openstreetmap.org/wiki/Relation:boundary http://wiki.openstreetmap.org/wiki/Relation:restriction http://wiki.openstreetmap.org/wiki/Relation:waterway One can always leave it blank if you feel adding a value brings little or no benefit. answered 29 Oct '12, 22:23 robbieonsea 904●1●13●25 accept rate: 16%

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Question tags:

×128
×12

question asked: 06 Mar '11, 17:59

question was seen: 12,170 times

last updated: 30 Oct '12, 08:31

### Related questions

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum