[[TranslatedPages(outdated=This page is outdated. Parent and Child tabs are not explained at all and the tags-and-members tab needs more information and the context menu. Also the first paragraph needs rework or even some parts moved to other pages.)]] [[PageOutline(2-10,Table of Contents)]] ''If you are looking for complete list of [Concepts/Object#Relations relations] loaded in your JOSM, see [Dialog/RelationList Relation List dialog]''[[br]] ''Relations can be also edited using [Help/Menu/TagsMembershipMenu#Rightclickonitemsinmembershipspart simple right click menu] in [Help/Dialog/TagsMembership Tags/Membership Dialog]''[[br]] ''Some of [wiki:Plugins plugins] can simplify editing of relations, namely [Help/Plugin/TurnRestrictions turnrestrictions] or [http://wiki.openstreetmap.org/wiki/Relations/Proposed/turn_lanes#Plugin turnlanes]'' = Relation Editor Dialog = The relation editor dialog is one of many options to create, modify, and delete relations; this is most comprehensive tool in core JOSM. In the [#TagMember Tags and Members tab] below the listed keys and values there is a list that any relations of which the selected object is a member of is listed together with its "role" in that relation. Double-clicking on a line there will open this relationship editor for the relation in question. == Relation Editor == In has four buttons on top: || [[Image(source:trunk/images/dialogs/refresh.png)]] || Refresh relation from data layer (see [#RelationChangedOutsideOfEditor below] for more explanation) || || [[Image(source:trunk/images/save.png)]] || Apply the current changes made within the relation editor to the data || || [[Image(source:trunk/images/duplicate.png)]] || Clone e.g create a copy of the relation and open it in another relation editor dialog || || [[Image(source:trunk/images/dialogs/delete.png)]] || Delete the currently edited relation || === Tags and Members tab ===#TagMember The tags and members tab has an upper part similar to the [Dialog/TagsMembership Tags/Memberships Dialog] where tags for the relation can be entered and a lower part that contains the list of members of the relation on the left side and a list of the current selection on the right. [[Image(relation_editor.png,right,margin-left=15)]] ==== Upper half, tags of the relation itself ==== 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. The three button one the left are: || [[Image(source:trunk/images/dialogs/add.png)]] || Add a new tag || || [[Image(source:trunk/images/dialogs/delete.png)]] || Delete the current selected boxes of the tag table || || [[Image(source:trunk/images/pastetags.png)]] || Paste tags from buffer || Note: In general it is easier to modify tags with the [Dialog/TagsMembership Tags/Memberships Dialog]. ==== Bottom half, left side, members ==== In the lower left part is the member list of the relation. The list shows each member with its role on the left, in the middle the object type as icon plus some identifier like name, ref or simply the id of the object and on the right information about neighbor ways' connections useful for consistency checks like checking that the members of a multipolygon form closed ways or that a route is a complete line without missing some ways in the middle. Selecting members in this list works as usual and changing the role of a member is possible by clicking on the role. Alternatively, the apply role text field at the bottom allows to set a role to all currently selected members. The buttons on the left offer the following actions if appropriate: || [[Image(source:trunk/images/dialogs/moveup.png)]] || Move the currently selected members up (**`Alt+up`**) || || [[Image(source:trunk/images/dialogs/movedown.png)]] || Move the currently selected members down (**`Alt+down`**) || || || || || [[Image(source:trunk/images/dialogs/edit.png)]] || Open additional relation editors for the currently selected members of object type relation || || [[Image(source:trunk/images/dialogs/delete.png)]] || Remove the currently selected members from the relation (**`Alt+Delete`**) || || || || || [[Image(source:trunk/images/dialogs/sort.png)]] || Sort the currently selected members (**`Alt+End`**) || || [[Image(source:trunk/images/dialogs/sort_below.png)]] || Sort the currently selected members and all members below ([ExpertMode expert mode] only) || || [[Image(source:trunk/images/dialogs/relation/reverse.png)]] || Reverse the order of the currently selected members || || || || || [[Image(source:trunk/images/dialogs/relation/downloadincomplete.png)]] || Download all incomplete members (**`Alt+Home`**) || || [[Image(source:trunk/images/dialogs/relation/downloadincompleteselected.png)]] || Download selected incomplete members || ==== Bottom half, right side, selection ==== 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 [Dialog/SelectionList selection list toggle dialog]. Objects with yellow background color are already member of the relation. The buttons offer following actions: || [[Image(source:trunk/images/dialogs/conflict/copystartright.svg)]] || Add all objects selected in the current data set before the first member || || [[Image(source:trunk/images/dialogs/conflict/copybeforecurrentright.svg,)]] || Add all objects selected in the current data set before the first selected member || || [[Image(source:trunk/images/dialogs/conflict/copyaftercurrentright.svg)]] || Add all objects selected in the current data set after the last member selected member || || [[Image(source:trunk/images/dialogs/conflict/copyendright.svg)]] || Add all objects selected in the current data set after the last member || || || || || [[Image(source:trunk/images/dialogs/relation/selectmembers.svg)]] || Select relation members in the member list which refer to objects in the current selection || || [[Image(source:trunk/images/dialogs/relation/selectprimitives.svg)]] || Select objects in the current data set for currently selected relation members in the member list || || || || || [[Image(source:trunk/images/dialogs/relation/deletemembers.svg)]] || Remove all members referring to one of the selected objects in the current data set === Parent Relations tab === === Child Relations tab === == 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 [wiki:Help/Dialog/SelectionList Selection List Dialog] 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 Dialog 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 {{{ #!html }}} A relation may be edited concurrently in the relation editor dialog ''and'' outside of the relation editor dialog. While the relation editor dialog 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 dialog. You need to click on the [[Image(source:trunk/images/dialogs/refresh.png)]] refresh button to update the data in the relation editor. Anyhow JOSM keeps track of them and when you close the relation editor dialog or apply changes, without pressing the refresh button before, the following warning message is displayed: [[Image(warning-conflict-in-data.png)]] It indicates that JOSM is aware of two incompatible [Concepts/Object#Objectversions versions] of this relation. Since JOSM can't resolve the differences between these versions automatically, it proposes to create a [Concepts/Conflict conflict] which you can [Concepts/Conflict#Resolvingconflicts resolve] later using the [Dialog/Conflict Conflict Dialog]. A similar warning is the following: [[Image(relation_conflict.png)]] 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 [[Image(source:trunk/images/save.png)]] apply button.''' * '''After doing changes in the data layer and before doing changes in the relation editor press the [[Image(source:trunk/images/dialogs/refresh.png)]] 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 window. [[Image(relation_editor_unsaved_changes_warning.png,900)]] == See also == * [[Image(source:trunk/images/dialogs/relationlist.png,20,middle)]] [Dialog/RelationList Relation list dialog] * [Concepts/Conflict Conflict] * [Concepts/Object Object] ---- Back to [wiki:/Help Main Help]