[[TranslatedPages]] [[PageOutline(2-10,Table of Contents)]] = Relation Editor = A Relation editor handles the members and [wikitr:/Help/Concepts/Object#Tags1 tags] of exactly one [[JOSMImage(data/relation)]] [wikitr:/Help/Concepts/Object#Relations relation]. \\ \\ Don't confuse it with the [wikitr:/Help/Dialog/RelationList Relations list panel]. That [wikitr:/Help/ToggleDialogs Sidebar] panel lists all relations. == The Dialog Layout == === Buttons on top ===#Buttonsontop ||= **Icon** =||= **Description** =|| || [[JOSMImage(dialogs/refresh)]] || Refresh relation from data layer (see [#RelationChangedOutsideOfEditor below] for more explanation) || || [[JOSMImage(save)]] || Apply the current changes made within the relation editor to the data (see [#RelationChangedOutsideOfEditor below] for more explanation) || || [[JOSMImage(dialogs/select)]] || Select the relation of the relation editor || || [[JOSMImage(duplicate)]] || Clone e.g create a copy of the relation and open it in another relation editor || || [[JOSMImage(dialogs/delete,24,link=,middle)]] || Delete the currently edited relation || === Tags and Members tab ===#TagMember The tags and members tab has an upper half where tags for the relation itself can be entered. Its lower part has two separate lists. On the left the members of the relation are listed. The list on the right hand side shows the current selection of map objects. In between the two parts the horizontal separator includes two buttons on the left side with a [[JOSMImage(svpUp,link=,middle,16)]] up and [[JOSMImage(svpDown,link=,middle,16)]] down arrow to move the separator to center, up or down and hide, respectively, display the upper or lower part. ==== Tags of Relation (upper part) ====#TagsRelation On top in the upper part are links to presets matching the current ''**tags of the relation**'' and below are the tags in a table. Presets matching relation can be opened here (they are more suggestive than tags panel). [wikitr:/Introduction#Leftmouseclickonrespectivepresetheadingwillopencompletepresetview Click respective link to open full preset], as usual. [[Image(relation_editor.png,right,margin-left=15,link=)]] The three button one the left are: ||= **Icon** =||= **Description** =|| || [[JOSMImage(dialogs/add)]] || Add a new tag || || [[JOSMImage(dialogs/delete,24,link=,middle)]] || Delete the current selected boxes of the tag table || || [[JOSMImage(pastetags)]] || Paste tags from buffer || When a tag line is selected, the `F1` key links to the tag's OSM wiki page, like in the [[JOSMImage(dialogs/propertiesdialog)]] [wikitr:/Help/Dialog/TagsMembership Tags/Memberships panel] **Note**: In general, it is easier to modify tags with the Tags/Memberships panel. ==== Members List (bottom half, left side) ====#MembersList In the lower left part is the member table of the relation. ===== Table =====#Table The table shows for each member: ||= **Title** =||= **Description** =|| || Role || its role || || Refers to || the object type as icon plus some identifier like name, ref or simply the id of the object ; Double-clicking on a line with ''complete relation'' there will open this ''Relationship editor'' for the relation in question || || || on the right information about neighbor ways' connections useful for consistency checks like checking that the members of a [wikitr:/Help/Concepts/Object#typemultipolygon multipolygon] form closed ways or that a route is a complete line without missing some ways in the middle || ====== Context menu in table ====== Gap is indicated as red dot. ||= **Icon** =||= **Name** =||= **Description** =|| || || Zoom to || select the topmost element of the [#Currentlyselectedmembers currently selected members] in [[JOSMImage(dialogs/selectionlist)]] [wikitr:/Help/Dialog/SelectionList selection list panel] and zoom to it || |||| || || Zoom to Gap || will zoom to gap (only available when gap is selected) || |||| || || Select previous gap || select the previous member ahead without connection above || || || Select next gap || select the next member behind without connection below || || [[JOSMImage(dialogs/history)]] || History || open a [wikitr:/Help/Action/ObjectHistory History browser] for each [#Currentlyselectedmembers currently selected member] || ===== Currently selected members =====#Currentlyselectedmembers Selecting members in the [#Table members list table] works as usual: hold `Ctrl` to select multiple items. Left click on the item to add/remove it from the selection. On the right you can see an example with only one member way selected. ===== Buttons ===== The buttons on the left offer the following actions if appropriate. (''Plugins may add additional buttons.)'': ||= **Icon** =||= **Shortcut** =||= **Description** =|| || [[JOSMImage(dialogs/up)]] || **`Alt+up`** || Move the [#Currentlyselectedmembers currently selected members] up || || [[JOSMImage(dialogs/down)]] || **`Alt+down`** || Move ''the currently selected members'' down || |||| || [[JOSMImage(dialogs/edit)]] || || Open additional relation editors for ''the currently selected members'' of object type relation || || [[JOSMImage(dialogs/delete,24,link=,middle)]] || **`Alt+Delete`** || Remove ''the currently selected members'' from the relation || |||| || [[JOSMImage(dialogs/sort)]] || **`Alt+End`** || Sort ''the currently selected members'' || || [[JOSMImage(dialogs/sort_below)]] || || Sort ''the currently selected members'' and all members below ([wikitr:/Help/ExpertMode expert mode] only) || || [[JOSMImage(dialogs/reverse)]] || || Reverse the order of the currently selected members || |||| || [[JOSMImage(dialogs/relation/downloadincomplete)]] || **`Alt+Home`** || Download all incomplete members || || [[JOSMImage(dialogs/relation/downloadincompleteselected)]] || || Download selected incomplete members || **Note**: Besides the listed buttons and shortcuts above, `Ctrl+C`, `Ctrl+V` and `Ctrl+X` work as common in the member list. Text field below the table can be used to set a role to all [#Currentlyselectedmembers Currently selected members] ==== Selection List (bottom half, right side) ====#SelectionList In the lower right part is the selection list where currently selected objects in the current data set are shown. The list is basically a mirror of the [wikitr:/Help/Dialog/SelectionList Selection list]. Objects with yellow background color are already member of the relation. The buttons offer following actions: ||= **Icon** =||= **Description** =|| || [[JOSMImage(dialogs/conflict/copystartright)]] || Add all objects selected in the current data set before the first member || || [[JOSMImage(dialogs/conflict/copybeforecurrentright,)]] || Add all objects selected in the current data set before the first selected member || || [[JOSMImage(dialogs/conflict/copyaftercurrentright)]] || Add all objects selected in the current data set after the last member selected member || || [[JOSMImage(dialogs/conflict/copyendright)]] || Add all objects selected in the current data set after the last member || |||| || [[JOSMImage(dialogs/relation/selectmembers)]] || Select relation members in the member list which refer to objects in the current selection || || [[JOSMImage(dialogs/relation/selectprimitives)]] || Select objects in the current data set for currently selected relation members in the member list || |||| || [[JOSMImage(dialogs/relation/deletemembers)]] || Remove all members referring to one of the selected objects in the current data set || === Parent Relations tab ===#ParentRelations Reload button - will fetch all parent relation from API (parent relations list will be empty if there no parent relations). Double click at any parent relation will open ''Relation editor'' with respective relation. Note: only one parent relation is shown for [osmwww:relation/51560 relation 51560]: [[Image(relation 51560.png,link=,600)]] === Child Relations tab ===#ChildRelations This pane recursively shows all child relations, e.g., for a [osmwiki:Relation:network network] all of its [osmwiki:Relation:route_master route master] and [osmwiki:Relation:route route] relations. Incomplete relations are downloaded when expanding or double-clicking the tree node. A separate relation editor is opened when double-clicking one of the child relations. [[Image(children of 6016064.png,link=,600)]] == Drag and Drop support == The Relation editor has an advanced drag and drop support. You can do the following actions: * reorder the members in the members list * move an object from the [wikitr:/Help/Dialog/SelectionList Selection list] to the members list in the relation editor (with automatic role suggestion) * move an object from the members list of one relation editor instance to another relation editor instance * move an object from the members list of one relation editor instance to another relation editor instance from another layer* * move an object from the members list of one relation editor instance to another relation editor instance from another JOSM instance* * move an object from the members list of the relation editor or from the Selection list to an external text editor ^^* provided the objects are part of the dataset == Error and Warning Messages == === Conflict in data when saving or applying a relation ===#RelationChangedOutsideOfEditor A relation may be edited concurrently in the relation editor ''and'' outside of the relation editor. While the relation editor for a relation is open you may for instance split a way the relation refers to. In this case, the relation is modified but the changes due to the way splitting are not immediately reflected in the relation editor. You need to click on the [[JOSMImage(dialogs/refresh)]] refresh button to update the data in the relation editor. Anyhow JOSM keeps track of them and when you close the relation editor or apply changes, without pressing the refresh button before, the following warning message is displayed: [[Image(warning-conflict-in-data.png,link=)]] It indicates that JOSM is aware of two incompatible [wikitr:/Help/Concepts/Object#Objectversionsandhistory versions] of this relation. Since JOSM can't resolve the differences between these versions automatically, it proposes to create a [wikitr:/Help/Concepts/Conflict conflict] which you can [wikitr:/Help/Concepts/Conflict#Resolvingconflicts resolve] later using the [wikitr:/Help/Dialog/Conflict Conflict Dialog]. A similar warning is the following: [[Image(relation_conflict.png,link=)]] It appears when you made changes in the relation and in the data layer and then click on the refresh button. **So the workflow should always be like this** (if you want to do changes in the relation editor **''and''** the data layer at the same time, i.e. while the relation editor stays open): * **After doing changes in the relation editor** and **before doing changes in the data layer** press the [[JOSMImage(save)]] apply button. * **After doing changes in the data layer** and **before doing changes in the relation editor** press the [[JOSMImage(dialogs/refresh)]] refresh button. Otherwise you will see the above warnings and end in a conflict. === Unsaved changes === The following warning appears when you make changes in the relation editor and do not press the Apply or OK button, but the Cancel button, the cross or `Escape` to close the relation editor. [[Image(relation_editor_unsaved_changes_warning.png,link=)]] == See also == * [[JOSMImage(dialogs/relationlist)]] [wikitr:/Help/Dialog/RelationList Relations list] - all loaded relations are listed here * [wikitr:/Help/Concepts/Object#Relations Concepts Object] - detailed explanation what ''relation'' is * [wikitr:/Help/Relations Relations] - steps how to create parent relations, edit parent/child relations and so on * [wikitr:/Help/Concepts/Conflict Concepts Conflict] - explanation of conflicts * Relations can be also edited using [wikitr:/Help/Menu/TagsMembershipMenu#Rightclickonaparentrelationinmembershipspart simple right click menu] in [wikitr:/Help/Dialog/TagsMembership Tags/Membership panel] * Some of [wikitr:/Plugins plugins] can simplify [wikitr:/Help/Relations editing of relations], namely [wikitr:/Help/Plugin/TurnRestrictions turnrestrictions], [osmwiki:Relations/Proposed/turn_lanes#Plugin turnlanes] or [osmwiki:JOSM/Plugins/PT_Assistant pt_assistant] ---- Back to [wikitr:/Help/Dialog Dialog] \\ Back to [wikitr:/Help Main Help]