Index: src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- src/org/openstreetmap/josm/io/OsmReader.java	(revision 15472)
+++ src/org/openstreetmap/josm/io/OsmReader.java	(working copy)
@@ -42,6 +42,7 @@
     protected XMLStreamReader parser;
 
     protected boolean convertUnknownToTags;
+    protected boolean saveOriginalId;
 
     private static final Set<String> COMMON_XML_ATTRIBUTES = new TreeSet<>();
 
@@ -64,7 +65,7 @@
      * @see #parseDataSet(InputStream, ProgressMonitor)
      */
     protected OsmReader() {
-        this(false);
+        this(false, false);
     }
 
     /**
@@ -75,7 +76,19 @@
      * @since 15470
      */
     protected OsmReader(boolean convertUnknownToTags) {
+        this(convertUnknownToTags, false);
         // Restricts visibility
+    }
+    /**
+     * constructor (for private and subclasses use only)
+     * @param convertUnknownToTags if true, keep unknown xml attributes as tags
+     * @param saveOriginalId if true, save the original id in a "current_id" tag
+     *
+     * @see #parseDataSet(InputStream, ProgressMonitor)
+     * @since xxx
+     */
+    protected OsmReader(boolean convertUnknownToTags, boolean saveOriginalId) {
+        // Restricts visibility
         this.convertUnknownToTags = convertUnknownToTags;
     }
 
@@ -432,6 +445,9 @@
                     }
                 }
             }
+            if (saveOriginalId) {
+                parseTag(current, "current_id", Long.toString(getLong("id")));
+            }
         } catch (UncheckedParseException | XMLStreamException e) {
             throw new IllegalDataException(e);
         }
@@ -496,7 +512,7 @@
      * @throws IllegalArgumentException if source is null
      */
     public static DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException {
-        return parseDataSet(source, progressMonitor, false);
+        return parseDataSet(source, progressMonitor, false, false);
     }
 
     /**
@@ -513,6 +529,24 @@
      */
     public static DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor, boolean convertUnknownToTags)
             throws IllegalDataException {
-        return new OsmReader(convertUnknownToTags).doParseDataSet(source, progressMonitor);
+        return parseDataSet(source, progressMonitor, convertUnknownToTags, false);
     }
+    
+    /**
+     * Parse the given input source and return the dataset.
+     *
+     * @param source the source input stream. Must not be null.
+     * @param progressMonitor the progress monitor. If null, {@link NullProgressMonitor#INSTANCE} is assumed
+     * @param convertUnknownToTags true if unknown xml attributes should be kept as tags
+     * @param saveOriginalId if true, keep the original id (as a tag, "current_id")
+     *
+     * @return the dataset with the parsed data
+     * @throws IllegalDataException if an error was found while parsing the data from the source
+     * @throws IllegalArgumentException if source is null
+     * @since xxx
+     */
+    public static DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor, boolean convertUnknownToTags, boolean saveOriginalId)
+            throws IllegalDataException {
+        return new OsmReader(convertUnknownToTags, saveOriginalId).doParseDataSet(source, progressMonitor);
+    }
 }
