Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java	(revision 2393)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java	(revision 2394)
@@ -12,10 +12,14 @@
 
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction;
+
 
 public class MemberTableLinkedCellRenderer extends MemberTableCellRenderer {
 
-    final static Image arrowUp = ImageProvider.get("dialogs", "arrowup").getImage();
-    final static Image arrowDown = ImageProvider.get("dialogs", "arrowdown").getImage();
-    final static Image corners = ImageProvider.get("dialogs", "roundedcorners").getImage();
+    final static Image arrowUp = ImageProvider.get("dialogs/relation", "arrowup").getImage();
+    final static Image arrowDown = ImageProvider.get("dialogs/relation", "arrowdown").getImage();
+    final static Image corners = ImageProvider.get("dialogs/relation", "roundedcorners").getImage();
+    final static Image roundabout_right = ImageProvider.get("dialogs/relation", "roundabout_right_tiny").getImage();
+    final static Image roundabout_left = ImageProvider.get("dialogs/relation", "roundabout_left_tiny").getImage();
     private WayConnectionType value = new WayConnectionType();
 
@@ -37,14 +41,4 @@
         if (value == null || !value.isValid()) {
             return;
-        }
-
-        Image arrow = null;
-        switch (value.direction) {
-            case 1:
-                arrow = arrowDown;
-                break;
-            case -1:
-                arrow = arrowUp;
-                break;
         }
 
@@ -100,8 +94,5 @@
         }
 
-        if ((arrow != null) && (value.linkPrev || value.linkNext)) {
-            g.drawImage(arrow, xoff-3, (y1 + y2) / 2 - 2, null);
-        }
-
+        /* vertical lines */
         g.setColor(Color.black);
         g.drawLine(xoff, y1, xoff, y2);
@@ -109,5 +100,23 @@
             g.drawLine(xoff+xloop, y1, xoff+xloop, y2);
         }
-        
+
+        /* special icons */
+        Image arrow = null;
+        switch (value.direction) {
+            case FORWARD:
+                arrow = arrowDown;
+                break;
+            case BACKWARD:
+                arrow = arrowUp;
+                break;
+        }
+        if ((arrow != null) && (value.linkPrev || value.linkNext)) {
+            g.drawImage(arrow, xoff-3, (y1 + y2) / 2 - 2, null);
+        }
+        else if (value.direction == Direction.ROUNDABOUT_LEFT) {
+            g.drawImage(roundabout_left, xoff-6, 1, null);
+        } else if (value.direction == Direction.ROUNDABOUT_RIGHT) {
+            g.drawImage(roundabout_right, xoff-6, 1, null);
+        }        
     }
 }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 2393)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 2394)
@@ -20,4 +20,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -25,5 +26,8 @@
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+
+import static org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction.*;
 
 public class MemberTableModel extends AbstractTableModel implements TableModelListener {
@@ -669,22 +673,22 @@
     }
 
-/**
- * Determines the direction of way k with reference to the way ref_i.
- * The direction of way ref_i is ref_direction.
- *
- * ref_i is usually the predecessor of k.
- *
- * direction:
- * Let the relation be a route of oneway streets, and someone travels them in the given order.
- * Direction is 1 for if it is legel and -1 if it is illegal to do so for the given way.
- *
- * If the two ways are not properly linked the return value is 0.
- **/
-    private int determineDirection(int ref_i,int ref_direction, int k) {
+    /**
+     * Determines the direction of way k with respect to the way ref_i.
+     * The way ref_i is assumed to have the direction ref_direction and
+     * to be the predecessor of k.
+     *
+     * If both ways are not linked in any way, NONE is returned.
+     * 
+     * Else the direction is given as follows:
+     * Let the relation be a route of oneway streets, and someone travels them in the given order.
+     * Direction is FORWARD for if it is legel and BACKWARD if it is illegal to do so for the given way.
+     *
+     **/
+    private Direction determineDirection(int ref_i,Direction ref_direction, int k) {
         if (ref_i < 0 || k < 0 || ref_i >= members.size() || k >= members.size()) {
-            return 0;
-        }
-        if (ref_direction == 0) {
-            return 0;
+            return NONE;
+        }
+        if (ref_direction == NONE) {
+            return NONE;
         }
         
@@ -702,21 +706,74 @@
         
         if (way_ref == null || way == null) {
-            return 0;
-        }
+            return NONE;
+        }
+
+        /** the list of nodes the way k can dock to */
+        List<Node> refNodes= new ArrayList<Node>();
         
-        Node nRef = ref_direction > 0 ? way_ref.lastNode() : way_ref.firstNode();
-        if (nRef == null) {
-            return 0;
+        switch (ref_direction) {
+            case FORWARD: 
+                refNodes.add(way_ref.lastNode());
+                break;
+            case BACKWARD:
+                refNodes.add(way_ref.firstNode());
+                break;
+            case ROUNDABOUT_LEFT:
+            case ROUNDABOUT_RIGHT:
+                refNodes = way_ref.getNodes();
+                break;
+        }
+                    
+        if (refNodes == null) {
+            return NONE;
         }
         
-        if (nRef == way.firstNode()) {
-            return 1;
-        }
-        if (nRef == way.lastNode()) {
-            return -1;
-        }
-        return 0;
-    }
-
+        for (Node n : refNodes) {
+            if (n == null) continue;
+            if (roundaboutType(k) != NONE) {
+                for (Node nn : way.getNodes()) {
+                    if (n == nn) {
+                        return roundaboutType(k);
+                    }
+                }
+            } else {
+                if (n == way.firstNode()) {
+                    return FORWARD;
+                }
+                if (n == way.lastNode()) {
+                    return BACKWARD;
+                }
+            }
+        }
+        return NONE;
+    }
+
+    /**
+     * determine, if the way i is a roundabout and if yes, what type of roundabout
+     */
+    private Direction roundaboutType(int i) {
+        RelationMember m = members.get(i);
+        if (m == null || !m.isWay()) return NONE;
+        Way w = m.getWay();
+        if (w != null &&        
+                "roundabout".equals(w.get("junction")) && 
+                w.getNodesCount() < 200 &&
+                w.getNodesCount() > 2 &&
+                w.getNode(0) != null && 
+                w.getNode(1) != null &&
+                w.getNode(2) != null &&
+                w.firstNode() == w.lastNode()) {
+            /** do some simple determinant / cross pruduct test on the first 3 nodes
+                to see, if the roundabout goes clock wise or ccw */
+            EastNorth en1 = w.getNode(0).getEastNorth();
+            EastNorth en2 = w.getNode(1).getEastNorth();
+            EastNorth en3 = w.getNode(2).getEastNorth();
+            en1 = en1.sub(en2);
+            en2 = en2.sub(en3);
+            return en1.north() * en2.east() - en2.north() * en1.east() > 0 ? ROUNDABOUT_LEFT : ROUNDABOUT_RIGHT;
+        } else
+            return NONE;
+    }
+    
     private WayConnectionType wayConnection(int i) {
         if (connectionType == null) {
@@ -730,4 +787,7 @@
     }
 
+    /**
+     * refresh the cache of member WayConnectionTypes
+     */
     public void updateLinks() {
         connectionType = null;
@@ -761,15 +821,25 @@
             boolean linkPrev = (i != firstGroupIdx);
             boolean linkNext;
-            int dir;
+            Direction dir;
             if (linkPrev) {
                 dir = determineDirection(i-1, con.get(i-1).direction, i);
-                linkNext = (determineDirection(i, dir, i+1) != 0);
+                linkNext = (determineDirection(i, dir, i+1) != NONE);
             }
             else {
-                dir = determineDirection(i, +1, i+1) != 0 ? +1 : 0;
-                if (dir == 0) {
-                    dir = determineDirection(i, -1, i+1) != 0 ? -1 : 0;
-                }
-                linkNext = (dir != 0);
+                if (roundaboutType(i) != NONE) {
+                    dir = determineDirection(i, roundaboutType(i), i+1) != NONE ? roundaboutType(i) : NONE;
+                } else { /** guess the direction and see if it fits with the next member */
+                    dir = determineDirection(i, FORWARD, i+1) != NONE ? FORWARD : NONE;
+                    if (dir == NONE) {
+                        dir = determineDirection(i, BACKWARD, i+1) != NONE ? BACKWARD : NONE;
+                    }
+                }
+                linkNext = (dir != NONE);
+                if (dir == NONE) {
+                    if (roundaboutType(i) != NONE) {
+                        dir = roundaboutType(i);
+                    }
+                }
+                    
             }
 
@@ -779,5 +849,5 @@
                 boolean loop;
                 if (i == firstGroupIdx) {
-                    loop = determineDirection(i, 1, i) == 1;
+                    loop = determineDirection(i, FORWARD, i) == FORWARD;
                 } else {
                     loop = determineDirection(i, dir, firstGroupIdx) == con.get(firstGroupIdx).direction;
@@ -792,4 +862,7 @@
         }
         connectionType = con;
+//        for (int i=0; i<con.size(); ++i) {
+//            System.err.println(con.get(i));
+//        }
     }
 }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/WayConnectionType.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/WayConnectionType.java	(revision 2393)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/WayConnectionType.java	(revision 2394)
@@ -3,4 +3,6 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+
+import static org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction.*;
 
 public class WayConnectionType {
@@ -14,16 +16,28 @@
 
     /** 
-     * direction is +1 if the first node of this way is connected to the previous way 
+     * direction is FORWARD if the first node of this way is connected to the previous way 
      * and / or the last node of this way is connected to the next way. 
-     * direction is -1 if it is the other way around.
-     * If this way is neither connected to the previous nor to the next way, then
-     * direction has the value 0.
+     * direction is BACKWARD if it is the other way around.
+     * direction has a ROUNDABOUT value, if it is tagged as such and it is somehow
+     * connected to the previous / next member.
+     * If there is no connection to the previous or next member, then
+     * direction has the value NONE.
      */
-    public final int direction;
+    public final Direction direction;
+    
+    public enum Direction {
+        FORWARD, BACKWARD, ROUNDABOUT_LEFT, ROUNDABOUT_RIGHT, NONE;
+        
+        public boolean isRoundabout() {
+            return this == ROUNDABOUT_RIGHT || this == ROUNDABOUT_LEFT;
+        }    
+    };
 
     /** True, if the element is part of a closed loop of ways. */
     public boolean isLoop;
 
-    public WayConnectionType(boolean linkPrev, boolean linkNext, int direction) {
+    public boolean isRoundabout = false;
+    
+    public WayConnectionType(boolean linkPrev, boolean linkNext, Direction direction) {
         this.linkPrev = linkPrev;
         this.linkNext = linkNext;
@@ -38,5 +52,5 @@
         this.linkNext = false;
         this.isLoop = false;
-        this.direction = 0;
+        this.direction = NONE;
         invalid = true;
     }
