Index: applications/editors/josm/plugins/opendata/build.xml
===================================================================
--- applications/editors/josm/plugins/opendata/build.xml	(revision 30795)
+++ applications/editors/josm/plugins/opendata/build.xml	(revision 30796)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <project name="opendata" default="dist" basedir=".">
-    <property name="plugin.main.version" value="7371"/>
+    <property name="plugin.main.version" value="7721"/>
     <property name="plugin.author" value="Don-vip"/>
     <property name="plugin.class" value="org.openstreetmap.josm.plugins.opendata.OdPlugin"/>
Index: applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java
===================================================================
--- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java	(revision 30795)
+++ applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java	(revision 30796)
@@ -9,4 +9,5 @@
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -43,4 +44,5 @@
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.data.validation.tests.DuplicateWay;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.io.AbstractReader;
@@ -116,23 +118,23 @@
     }
     
-        protected Node createOrGetEmptyNode(Point p) throws MismatchedDimensionException, TransformException {
-                Point p2 = (Point) JTS.transform(p, transform);
-                LatLon key = new LatLon(p2.getY(), p2.getX());
-                Node n = getNode(p2, key);
-                if(n != null && n.hasKeys()) {
-                        n = null;
-                }
-                if (n == null) {
-                        n = new Node(key);
-                        if (handler == null || handler.useNodeMap()) {
-                                nodes.put(key, n);
-                        }
-                        ds.addPrimitive(n);
-                } else if (n.getDataSet() == null) {
-                    // handler may have removed the node from DataSet (see Paris public light handler for example)
-                    ds.addPrimitive(n);
-                }
-                return n;
-        }
+    protected Node createOrGetEmptyNode(Point p) throws MismatchedDimensionException, TransformException {
+        Point p2 = (Point) JTS.transform(p, transform);
+        LatLon key = new LatLon(p2.getY(), p2.getX());
+        Node n = getNode(p2, key);
+        if (n != null && n.hasKeys()) {
+            n = null;
+        }
+        if (n == null) {
+            n = new Node(key);
+            if (handler == null || handler.useNodeMap()) {
+                nodes.put(key, n);
+            }
+            ds.addPrimitive(n);
+        } else if (n.getDataSet() == null) {
+            // handler may have removed the node from DataSet (see Paris public light handler for example)
+            ds.addPrimitive(n);
+        }
+        return n;
+    }
         
     protected <T extends OsmPrimitive> T addOsmPrimitive(T p) {
@@ -145,14 +147,36 @@
     }
 
-    protected final Way createWay(LineString ls) {
-        Way w = createWay();
+    protected final Way createOrGetWay(LineString ls) {
+        Way w = null;
+        Way tempWay = new Way();
         if (ls != null) {
+            // Build list of nodes 
             for (int i=0; i<ls.getNumPoints(); i++) {
                 try {
-                    w.addNode(createOrGetNode(ls.getPointN(i)));
+                    tempWay.addNode(createOrGetNode(ls.getPointN(i)));
                 } catch (Exception e) {
                     Main.error(e.getMessage());
                 }
             }
+            // Find possible duplicated ways
+            if (tempWay.getNodesCount() > 0) {
+                List<Way> candidates = OsmPrimitive.getFilteredList(tempWay.firstNode().getReferrers(), Way.class);
+                candidates.remove(tempWay);
+                List<LatLon> tempNodes = DuplicateWay.getOrderedNodes(tempWay);
+                for (Way candidate : candidates) {
+                    List<LatLon> candNodesA = DuplicateWay.getOrderedNodes(candidate);
+                    List<LatLon> candNodesB = new ArrayList<>(candNodesA);
+                    Collections.reverse(candNodesB);
+                    if (tempNodes.equals(candNodesA) || tempNodes.equals(candNodesB)) {
+                        w = candidate;
+                        break;
+                    }
+                }
+            }
+        }
+        // If no duplicate way found, create new one
+        if (w == null) {
+            w = createWay();
+            w.setNodes(tempWay.getNodes());
         }
         return w;
Index: applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java
===================================================================
--- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java	(revision 30795)
+++ applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java	(revision 30796)
@@ -138,13 +138,13 @@
                                 r = createMultipolygon();
                             }
-                            w = createWay(p.getExteriorRing());
+                            w = createOrGetWay(p.getExteriorRing());
                             if (r != null) {
                                 addWayToMp(r, "outer", w);
                                 for (int j=0; j<p.getNumInteriorRing(); j++) {
-                                    addWayToMp(r, "inner", createWay(p.getInteriorRingN(j)));
+                                    addWayToMp(r, "inner", createOrGetWay(p.getInteriorRingN(j)));
                                 }
                             }
                         } else if (g instanceof LineString) {
-                            w = createWay((LineString) g);
+                            w = createOrGetWay((LineString) g);
                         } else if (g instanceof Point) {
                             // Some belgian data sets hold points into collections ?!
