Index: src/org/openstreetmap/josm/plugins/importvec/Settings.java
===================================================================
--- src/org/openstreetmap/josm/plugins/importvec/Settings.java	(revision 34722)
+++ src/org/openstreetmap/josm/plugins/importvec/Settings.java	(working copy)
@@ -14,7 +14,7 @@
     }
     public static void setCurveSteps(long value) {
         if (value < 1)
-            throw new IllegalArgumentException("Curve steps cannot less than 1");
+            throw new IllegalArgumentException("Curve steps cannot be less than 1");
         Config.getPref().putLong("importvec.curvesteps", value);
     }
     
Index: src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java
===================================================================
--- src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java	(revision 34722)
+++ src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java	(working copy)
@@ -12,6 +12,8 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -44,7 +46,7 @@
  * @author ak
  */
 public class SvgImportTask extends PleaseWaitRunnable {
-    LinkedList<Node> nodes = new LinkedList<>();
+    HashMap<LatLon, Node> nodes = new LinkedHashMap<>();
     LinkedList<Way> ways = new LinkedList<>();
     private List<File> files;
     private boolean canceled;
@@ -73,12 +75,23 @@
         if (currentway == null) {
             throw new IOException("Shape is started incorectly");
         }
-        Node nd = new Node(projection.eastNorth2latlon(center.add(x * scale, -y * scale)));
+    	Node nd = new Node(projection.eastNorth2latlon(center.add(x * scale, -y * scale)));
         if (nd.getCoor().isOutSideWorld()) {
             throw new IOException("Shape goes outside the world");
         }
+        if (currentway.getNodesCount() > 0 &&  nd.getCoor().equalsEpsilon(currentway.lastNode().getCoor())) {
+        	// don't add node that will be saved at the same location as the previous one
+        	return;
+        }
+    	LatLon rounded = nd.getCoor().getRoundedToOsmPrecision();
+    	Node old = nodes.get(rounded);
+        boolean isNewNode = old == null;
+        if (isNewNode) {
+        	nodes.put(rounded, nd);
+        } else {
+        	nd = old;
+        } 
         currentway.addNode(nd);
-        nodes.add(nd);
         lastX = x;
         lastY = y;
     }
@@ -135,10 +148,9 @@
                         appendNode(coords[0], coords[1]);
                         break;
                     case PathIterator.SEG_CLOSE:
-                        if (currentway.firstNode().getCoor().equalsEpsilon(nodes.getLast().getCoor())) {
-                            currentway.removeNode(nodes.removeLast());
-                        }
-                        currentway.addNode(currentway.firstNode());
+                    	if (currentway.lastNode() != currentway.firstNode()) {
+                    		currentway.addNode(currentway.firstNode());
+                    	}
                         break;
                     case PathIterator.SEG_QUADTO:
                         double lastx = lastX;
@@ -191,11 +203,13 @@
         }
         DataSet ds = MainApplication.getLayerManager().getEditDataSet();
         List<Command> cmds = new ArrayList<>();
-        for (Node n : nodes) {
+        for (Node n : nodes.values()) {
             cmds.add(new AddCommand(ds, n));
         }
         for (Way w : ways) {
-            cmds.add(new AddCommand(ds, w));
+        	if (w.getNodesCount() > 0) {
+        		cmds.add(new AddCommand(ds, w));
+        	}
         }
         UndoRedoHandler.getInstance().add(new SequenceCommand("Import primitives", cmds));
     }
