Index: trunk/nodist/data/ozi.wpt
===================================================================
--- trunk/nodist/data/ozi.wpt	(revision 18179)
+++ trunk/nodist/data/ozi.wpt	(revision 18179)
@@ -0,0 +1,13 @@
+OziExplorer Waypoint File Version 1.1
+WGS 84
+Reserved 2
+Reserved 3
+1,GCEBB,35.972033,-87.134700,,0,1,3,0,65535,Mountain Bike Heaven by susy1313,0,0,0,0,6,0,17
+2,GC1A37,36.090683,-86.679550,,0,1,3,0,65535,The Troll by a182pilot & Family,0,0,0,0,6,0,17
+3,GC1C2B,35.996267,-86.620117,,0,1,3,0,65535,Dive Bomber by JoGPS & family,0,0,0,0,6,0,17
+4,GC25A9,36.038483,-86.648617,,0,1,3,0,65535,FOSTER by JoGPS & Family,0,0,0,0,6,0,17
+5,GC2723,36.112183,-86.741767,,0,1,3,0,65535,Logan Lighthouse by JoGps & Family,0,0,0,0,6,0,17
+6,GC2B71,36.064083,-86.790517,,0,1,3,0,65535,Ganier Cache by Susy1313,0,0,0,0,6,0,17
+7,GC309F,36.087767,-86.809733,,0,1,3,0,65535,Shy's Hill by FireFighterEng33,0,0,0,0,6,0,17
+8,GC317A,36.057500,-86.892000,,0,1,3,0,65535,GittyUp by JoGPS / Warner Parks,0,0,0,0,6,0,17
+9,GC317D,36.082800,-86.867283,,0,1,3,0,65535,Inlighting by JoGPS / Warner Parks,0,0,0,0,6,0,17
Index: trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 18178)
+++ trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 18179)
@@ -28,4 +28,5 @@
 import org.openstreetmap.josm.gui.io.importexport.OsmChangeImporter;
 import org.openstreetmap.josm.gui.io.importexport.OsmImporter;
+import org.openstreetmap.josm.gui.io.importexport.OziWptImporter;
 import org.openstreetmap.josm.gui.io.importexport.RtkLibImporter;
 import org.openstreetmap.josm.gui.io.importexport.WMSLayerImporter;
@@ -68,4 +69,5 @@
                 GpxImporter.class,
                 NMEAImporter.class,
+                OziWptImporter.class,
                 RtkLibImporter.class,
                 NoteImporter.class,
Index: trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxLikeImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxLikeImporter.java	(revision 18179)
+++ trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxLikeImporter.java	(revision 18179)
@@ -0,0 +1,102 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.io.importexport;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Objects;
+
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+
+import org.openstreetmap.josm.actions.ExtensionFileFilter;
+import org.openstreetmap.josm.gui.HelpAwareOptionPane;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.Notification;
+import org.openstreetmap.josm.gui.layer.GpxLayer;
+import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.gui.util.GuiHelper;
+import org.openstreetmap.josm.io.Compression;
+import org.openstreetmap.josm.io.IGpxReader;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.xml.sax.SAXException;
+
+/**
+ * Abstraction of {@link NMEAImporter}, {@link OziWptImporter} and {@link RtkLibImporter}.
+ * @param <T> GPX reader type
+ * @since 18179
+ */
+public abstract class GpxLikeImporter<T extends IGpxReader> extends FileImporter {
+
+    private Class<T> klass;
+
+    /**
+     * Constructs a new {@code GpxLikeImporter}.
+     * @param filter The extension file filter
+     * @param klass type class
+     */
+    protected GpxLikeImporter(ExtensionFileFilter filter, Class<T> klass) {
+        super(Objects.requireNonNull(filter));
+        this.klass = Objects.requireNonNull(klass);
+    }
+
+    @Override
+    public final void importData(File file, ProgressMonitor progressMonitor) throws IOException {
+        final String fn = file.getName();
+        try (InputStream fis = Compression.getUncompressedFileInputStream(file)) {
+            final T r = buildAndParse(fis, klass);
+            if (r.getNumberOfCoordinates() > 0) {
+                r.getGpxData().storageFile = file;
+                final GpxLayer gpxLayer = new GpxLayer(r.getGpxData(), fn, true);
+                final File fileFinal = file;
+
+                GuiHelper.runInEDT(() -> {
+                    MainApplication.getLayerManager().addLayer(gpxLayer);
+                    if (Config.getPref().getBoolean("marker.makeautomarkers", true)) {
+                        MarkerLayer ml = new MarkerLayer(r.getGpxData(), tr("Markers from {0}", fn), fileFinal, gpxLayer);
+                        if (!ml.data.isEmpty()) {
+                            MainApplication.getLayerManager().addLayer(ml);
+                        }
+                    }
+                });
+            }
+            showInfobox(r.getNumberOfCoordinates() > 0, r);
+        }
+    }
+
+    protected final void showInfobox(boolean success, T r) {
+        final StringBuilder msg = new StringBuilder(160).append("<html>")
+           .append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates()));
+        appendInfoboxContent(msg, success, r);
+        msg.append("</html>");
+        if (success) {
+            SwingUtilities.invokeLater(() -> new Notification(
+                    "<h3>" + tr("Import success:") + "</h3>" + msg.toString())
+                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
+                    .show());
+        } else {
+            HelpAwareOptionPane.showMessageDialogInEDT(
+                    MainApplication.getMainFrame(),
+                    msg.toString(),
+                    tr("Import failure!"),
+                    JOptionPane.ERROR_MESSAGE, null);
+        }
+    }
+
+    protected void appendInfoboxContent(StringBuilder msg, boolean success, T r) {
+        // Complete if needed
+    }
+
+    protected static final <T extends IGpxReader> T buildAndParse(InputStream fis, Class<T> klass) throws IOException {
+        try {
+            final T r = klass.getConstructor(InputStream.class).newInstance(fis);
+            r.parse(true);
+            return r;
+        } catch (SAXException | ReflectiveOperationException | IllegalArgumentException | SecurityException e) {
+            throw new IOException(e);
+        }
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/io/importexport/NMEAImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/importexport/NMEAImporter.java	(revision 18178)
+++ trunk/src/org/openstreetmap/josm/gui/io/importexport/NMEAImporter.java	(revision 18179)
@@ -8,20 +8,7 @@
 import java.io.InputStream;
 
-import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
-
 import org.openstreetmap.josm.actions.ExtensionFileFilter;
-import org.openstreetmap.josm.gui.HelpAwareOptionPane;
-import org.openstreetmap.josm.gui.MainApplication;
-import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.gui.io.importexport.GpxImporter.GpxImporterData;
-import org.openstreetmap.josm.gui.layer.GpxLayer;
-import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
-import org.openstreetmap.josm.gui.progress.ProgressMonitor;
-import org.openstreetmap.josm.gui.util.GuiHelper;
-import org.openstreetmap.josm.io.Compression;
 import org.openstreetmap.josm.io.nmea.NmeaReader;
-import org.openstreetmap.josm.spi.preferences.Config;
-import org.xml.sax.SAXException;
 
 /**
@@ -29,5 +16,5 @@
  * @since 1637
  */
-public class NMEAImporter extends FileImporter {
+public class NMEAImporter extends GpxLikeImporter<NmeaReader> {
 
     /**
@@ -41,53 +28,15 @@
      */
     public NMEAImporter() {
-        super(FILE_FILTER);
+        super(FILE_FILTER, NmeaReader.class);
     }
 
     @Override
-    public void importData(File file, ProgressMonitor progressMonitor) throws IOException {
-        final String fn = file.getName();
-        try (InputStream fis = Compression.getUncompressedFileInputStream(file)) {
-            final NmeaReader r = buildAndParse(fis);
-            if (r.getNumberOfCoordinates() > 0) {
-                r.getGpxData().storageFile = file;
-                final GpxLayer gpxLayer = new GpxLayer(r.getGpxData(), fn, true);
-                final File fileFinal = file;
-
-                GuiHelper.runInEDT(() -> {
-                    MainApplication.getLayerManager().addLayer(gpxLayer);
-                    if (Config.getPref().getBoolean("marker.makeautomarkers", true)) {
-                        MarkerLayer ml = new MarkerLayer(r.getGpxData(), tr("Markers from {0}", fn), fileFinal, gpxLayer);
-                        if (!ml.data.isEmpty()) {
-                            MainApplication.getLayerManager().addLayer(ml);
-                        }
-                    }
-                });
-            }
-            showNmeaInfobox(r.getNumberOfCoordinates() > 0, r);
-        }
-    }
-
-    private static void showNmeaInfobox(boolean success, NmeaReader r) {
-        final StringBuilder msg = new StringBuilder(160).append("<html>")
-           .append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates())).append("<br>")
-           .append(tr("Malformed sentences: {0}", r.getParserMalformed())).append("<br>")
+    protected void appendInfoboxContent(StringBuilder msg, boolean success, NmeaReader r) {
+        msg.append(tr("Malformed sentences: {0}", r.getParserMalformed())).append("<br>")
            .append(tr("Checksum errors: {0}", r.getParserChecksumErrors())).append("<br>");
         if (!success) {
             msg.append(tr("Unknown sentences: {0}", r.getParserUnknown())).append("<br>");
         }
-        msg.append(tr("Zero coordinates: {0}", r.getParserZeroCoordinates()))
-           .append("</html>");
-        if (success) {
-            SwingUtilities.invokeLater(() -> new Notification(
-                    "<h3>" + tr("NMEA import success:") + "</h3>" + msg.toString())
-                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
-                    .show());
-        } else {
-            HelpAwareOptionPane.showMessageDialogInEDT(
-                    MainApplication.getMainFrame(),
-                    msg.toString(),
-                    tr("NMEA import failure!"),
-                    JOptionPane.ERROR_MESSAGE, null);
-        }
+        msg.append(tr("Zero coordinates: {0}", r.getParserZeroCoordinates()));
     }
 
@@ -102,18 +51,8 @@
     public static GpxImporterData loadLayers(InputStream is, final File associatedFile,
                                              final String gpxLayerName) throws IOException {
-        final NmeaReader r = buildAndParse(is);
+        final NmeaReader r = buildAndParse(is, NmeaReader.class);
         final boolean parsedProperly = r.getNumberOfCoordinates() > 0;
         r.getGpxData().storageFile = associatedFile;
         return GpxImporter.loadLayers(r.getGpxData(), parsedProperly, gpxLayerName);
     }
-
-    static NmeaReader buildAndParse(InputStream fis) throws IOException {
-        final NmeaReader r = new NmeaReader(fis);
-        try {
-            r.parse(true);
-        } catch (SAXException e) {
-            throw new IOException(e);
-        }
-        return r;
-    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/io/importexport/OziWptImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/importexport/OziWptImporter.java	(revision 18179)
+++ trunk/src/org/openstreetmap/josm/gui/io/importexport/OziWptImporter.java	(revision 18179)
@@ -0,0 +1,48 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.io.importexport;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.openstreetmap.josm.actions.ExtensionFileFilter;
+import org.openstreetmap.josm.gui.io.importexport.GpxImporter.GpxImporterData;
+import org.openstreetmap.josm.io.ozi.OziWptReader;
+
+/**
+ * File importer allowing to import OziExplorer Waypoint files (*.wpt files).
+ * @since 18179
+ */
+public class OziWptImporter extends GpxLikeImporter<OziWptReader> {
+
+    /**
+     * The OziExplorer Waypoint file filter (*.wpt files).
+     */
+    public static final ExtensionFileFilter FILE_FILTER = ExtensionFileFilter.newFilterWithArchiveExtensions(
+            "wpt", "wpt", tr("OziExplorer Waypoint Files"), false);
+
+    /**
+     * Constructs a new {@code OziWptImporter}.
+     */
+    public OziWptImporter() {
+        super(FILE_FILTER, OziWptReader.class);
+    }
+
+    /**
+     * Replies the new GPX and marker layers corresponding to the specified wpt file.
+     * @param is input stream to data
+     * @param associatedFile wpt file
+     * @param gpxLayerName The GPX layer name
+     * @return the new GPX and marker layers corresponding to the specified wpt file
+     * @throws IOException if an I/O error occurs
+     */
+    public static GpxImporterData loadLayers(InputStream is, final File associatedFile,
+                                             final String gpxLayerName) throws IOException {
+        final OziWptReader r = buildAndParse(is, OziWptReader.class);
+        final boolean parsedProperly = r.getNumberOfCoordinates() > 0;
+        r.getGpxData().storageFile = associatedFile;
+        return GpxImporter.loadLayers(r.getGpxData(), parsedProperly, gpxLayerName);
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/io/importexport/RtkLibImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/importexport/RtkLibImporter.java	(revision 18178)
+++ trunk/src/org/openstreetmap/josm/gui/io/importexport/RtkLibImporter.java	(revision 18179)
@@ -8,20 +8,7 @@
 import java.io.InputStream;
 
-import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
-
 import org.openstreetmap.josm.actions.ExtensionFileFilter;
-import org.openstreetmap.josm.gui.HelpAwareOptionPane;
-import org.openstreetmap.josm.gui.MainApplication;
-import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.gui.io.importexport.GpxImporter.GpxImporterData;
-import org.openstreetmap.josm.gui.layer.GpxLayer;
-import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
-import org.openstreetmap.josm.gui.progress.ProgressMonitor;
-import org.openstreetmap.josm.gui.util.GuiHelper;
-import org.openstreetmap.josm.io.Compression;
 import org.openstreetmap.josm.io.rtklib.RtkLibPosReader;
-import org.openstreetmap.josm.spi.preferences.Config;
-import org.xml.sax.SAXException;
 
 /**
@@ -29,5 +16,5 @@
  * @since 15247
  */
-public class RtkLibImporter extends FileImporter {
+public class RtkLibImporter extends GpxLikeImporter<RtkLibPosReader> {
 
     /**
@@ -41,47 +28,5 @@
      */
     public RtkLibImporter() {
-        super(FILE_FILTER);
-    }
-
-    @Override
-    public void importData(File file, ProgressMonitor progressMonitor) throws IOException {
-        final String fn = file.getName();
-        try (InputStream fis = Compression.getUncompressedFileInputStream(file)) {
-            final RtkLibPosReader r = buildAndParse(fis);
-            if (r.getNumberOfCoordinates() > 0) {
-                r.getGpxData().storageFile = file;
-                final GpxLayer gpxLayer = new GpxLayer(r.getGpxData(), fn, true);
-                final File fileFinal = file;
-
-                GuiHelper.runInEDT(() -> {
-                    MainApplication.getLayerManager().addLayer(gpxLayer);
-                    if (Config.getPref().getBoolean("marker.makeautomarkers", true)) {
-                        MarkerLayer ml = new MarkerLayer(r.getGpxData(), tr("Markers from {0}", fn), fileFinal, gpxLayer);
-                        if (!ml.data.isEmpty()) {
-                            MainApplication.getLayerManager().addLayer(ml);
-                        }
-                    }
-                });
-            }
-            showRtkLibInfobox(r.getNumberOfCoordinates() > 0, r);
-        }
-    }
-
-    private static void showRtkLibInfobox(boolean success, RtkLibPosReader r) {
-        final StringBuilder msg = new StringBuilder(160).append("<html>")
-           .append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates()))
-           .append("</html>");
-        if (success) {
-            SwingUtilities.invokeLater(() -> new Notification(
-                    "<h3>" + tr("RTKLib import success:") + "</h3>" + msg.toString())
-                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
-                    .show());
-        } else {
-            HelpAwareOptionPane.showMessageDialogInEDT(
-                    MainApplication.getMainFrame(),
-                    msg.toString(),
-                    tr("RTKLib import failure!"),
-                    JOptionPane.ERROR_MESSAGE, null);
-        }
+        super(FILE_FILTER, RtkLibPosReader.class);
     }
 
@@ -96,18 +41,8 @@
     public static GpxImporterData loadLayers(InputStream is, final File associatedFile,
                                              final String gpxLayerName) throws IOException {
-        final RtkLibPosReader r = buildAndParse(is);
+        final RtkLibPosReader r = buildAndParse(is, RtkLibPosReader.class);
         final boolean parsedProperly = r.getNumberOfCoordinates() > 0;
         r.getGpxData().storageFile = associatedFile;
         return GpxImporter.loadLayers(r.getGpxData(), parsedProperly, gpxLayerName);
     }
-
-    static RtkLibPosReader buildAndParse(InputStream fis) throws IOException {
-        final RtkLibPosReader r = new RtkLibPosReader(fis);
-        try {
-            r.parse(true);
-        } catch (SAXException e) {
-            throw new IOException(e);
-        }
-        return r;
-    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDataHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDataHelper.java	(revision 18178)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDataHelper.java	(revision 18179)
@@ -72,5 +72,5 @@
                     JOptionPane.ERROR_MESSAGE
             );
-        } catch (IOException ex) {
+        } catch (IOException | UnsupportedOperationException ex) {
             Logging.error(ex);
             JOptionPane.showMessageDialog(
Index: trunk/src/org/openstreetmap/josm/io/IGpxReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/IGpxReader.java	(revision 18178)
+++ trunk/src/org/openstreetmap/josm/io/IGpxReader.java	(revision 18179)
@@ -8,5 +8,5 @@
 
 /**
- * Abstraction of {@code GpxReader}, {@code NmeaReader} and {@code RtkLibPosReader}
+ * Abstraction of {@code GpxReader}, {@code NmeaReader}, {@code OziWptReader} and {@code RtkLibPosReader}
  * @since 14010
  */
@@ -22,4 +22,5 @@
      * @throws SAXException if any SAX parsing error occurs
      * @throws IOException if any I/O error occurs
+     * @throws UnsupportedOperationException if the format is not supported
      */
     boolean parse(boolean tryToFinish) throws SAXException, IOException;
@@ -30,3 +31,12 @@
      */
     GpxData getGpxData();
+
+    /**
+     * Returns the number of coordinates that have been successfuly read.
+     * @return the number of coordinates that have been successfuly read
+     * @since 18179
+     */
+    default int getNumberOfCoordinates() {
+        throw new UnsupportedOperationException();
+    }
 }
Index: trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java	(revision 18178)
+++ trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java	(revision 18179)
@@ -215,8 +215,5 @@
     }
 
-    /**
-     * Returns the number of coordinates that have been successfuly read.
-     * @return the number of coordinates that have been successfuly read
-     */
+    @Override
     public int getNumberOfCoordinates() {
         return ps.success;
Index: trunk/src/org/openstreetmap/josm/io/ozi/OziWptReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ozi/OziWptReader.java	(revision 18179)
+++ trunk/src/org/openstreetmap/josm/io/ozi/OziWptReader.java	(revision 18179)
@@ -0,0 +1,112 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.io.ozi;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Objects;
+
+import org.openstreetmap.josm.data.SystemOfMeasurement;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.gpx.GpxConstants;
+import org.openstreetmap.josm.data.gpx.GpxData;
+import org.openstreetmap.josm.data.gpx.GpxTrack;
+import org.openstreetmap.josm.data.gpx.WayPoint;
+import org.openstreetmap.josm.io.IGpxReader;
+import org.openstreetmap.josm.tools.Logging;
+import org.xml.sax.SAXException;
+
+/**
+ * Reads an OziExplorer Waypoint file. Based on information from
+ * <a href="https://www.oziexplorer4.com/eng/help/fileformats.html">https://www.oziexplorer4.com</a>.
+ * @since 18179
+ */
+public class OziWptReader implements IGpxReader {
+
+    private static final int IDX_NAME = 1;
+    private static final int IDX_LAT = 2;
+    private static final int IDX_LON = 3;
+    private static final int IDX_DESC = 10;
+    private static final int IDX_ELE = 14;
+
+    private static final int INVALID_ELE = -777;
+
+    private final InputStream source;
+    private GpxData data;
+    private int success; // number of successfully parsed lines
+
+    /**
+     * Constructs a new {@code OziWptReader}
+     * @param source Ozi wpt file input stream
+     * @throws IOException if an I/O error occurs
+     */
+    public OziWptReader(InputStream source) throws IOException {
+        this.source = Objects.requireNonNull(source);
+    }
+
+    @Override
+    public boolean parse(boolean tryToFinish) throws SAXException, IOException {
+        data = new GpxData();
+        Collection<Collection<WayPoint>> currentTrack = new ArrayList<>();
+        Collection<WayPoint> waypoints = new ArrayList<>();
+        try (BufferedReader rd = new BufferedReader(new InputStreamReader(source, StandardCharsets.UTF_8))) {
+            int linecount = 0;
+            String line;
+            do {
+                line = rd.readLine();
+                if (line != null) {
+                    linecount++;
+                    if (linecount == 1) {
+                        if (!line.startsWith("OziExplorer Waypoint File")) {
+                            throw new UnsupportedOperationException("Unsupported format: " + line);
+                        }
+                    } else if (linecount == 2) {
+                        if (!"WGS 84".equals(line)) {
+                            throw new UnsupportedOperationException("Unsupported datum: " + line);
+                        }
+                    } else if (linecount == 3 || linecount == 4) {
+                        Logging.trace(line);
+                    } else {
+                        try {
+                            String[] fields = line.split(",");
+                            WayPoint currentwp = new WayPoint(new LatLon(
+                                    Double.parseDouble(fields[IDX_LAT]),
+                                    Double.parseDouble(fields[IDX_LON])));
+                            currentwp.put(GpxConstants.GPX_NAME, fields[IDX_NAME]);
+                            currentwp.put(GpxConstants.GPX_DESC, fields[IDX_DESC]);
+                            String ele = fields[IDX_ELE];
+                            if (!ele.isEmpty()) {
+                                int eleInFeet = Integer.parseInt(ele);
+                                if (eleInFeet != 0 && eleInFeet != INVALID_ELE) {
+                                    currentwp.put(GpxConstants.PT_ELE, eleInFeet * SystemOfMeasurement.IMPERIAL.aValue);
+                                }
+                            }
+                            waypoints.add(currentwp);
+                            success++;
+                        } catch (IllegalArgumentException e) {
+                            Logging.error(e);
+                        }
+                    }
+                }
+            } while (line != null);
+        }
+        currentTrack.add(waypoints);
+        data.tracks.add(new GpxTrack(currentTrack, Collections.<String, Object>emptyMap()));
+        return true;
+    }
+
+    @Override
+    public GpxData getGpxData() {
+        return data;
+    }
+
+    @Override
+    public int getNumberOfCoordinates() {
+        return success;
+    }
+}
Index: trunk/src/org/openstreetmap/josm/io/rtklib/RtkLibPosReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/rtklib/RtkLibPosReader.java	(revision 18178)
+++ trunk/src/org/openstreetmap/josm/io/rtklib/RtkLibPosReader.java	(revision 18179)
@@ -111,8 +111,5 @@
     }
 
-    /**
-     * Returns the number of coordinates that have been successfully read.
-     * @return the number of coordinates that have been successfully read
-     */
+    @Override
     public int getNumberOfCoordinates() {
         return success;
