Changeset 7326 in josm for trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
- Timestamp:
- 2014-07-22T00:17:42+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
r7033 r7326 20 20 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 21 21 import org.openstreetmap.josm.gui.util.GuiHelper; 22 import org.openstreetmap.josm.io.GpxImporter.GpxImporterData; 22 23 24 /** 25 * File importer allowing to import NMEA-0183 files (*.nmea/nme/nma/log/txt files). 26 * @since 1637 27 */ 23 28 public class NMEAImporter extends FileImporter { 24 29 30 /** 31 * The NMEA file filter (*.nmea *.nme *.nma *.log *.txt files). 32 */ 25 33 public static final ExtensionFileFilter FILE_FILTER = new ExtensionFileFilter( 26 34 "nmea,nme,nma,log,txt", "nmea", tr("NMEA-0183 Files") + " (*.nmea *.nme *.nma *.log *.txt)"); … … 42 50 final GpxLayer gpxLayer = new GpxLayer(r.data, fn, true); 43 51 final File fileFinal = file; 44 52 45 53 GuiHelper.runInEDT(new Runnable() { 46 54 @Override … … 88 96 } 89 97 } 98 99 public static GpxImporterData loadLayers(InputStream is, final File associatedFile, 100 final String gpxLayerName, String markerLayerName) throws IOException { 101 final NmeaReader r = new NmeaReader(is); 102 final boolean parsedProperly = r.getNumberOfCoordinates() > 0; 103 r.data.storageFile = associatedFile; 104 return GpxImporter.loadLayers(r.data, parsedProperly, gpxLayerName, markerLayerName); 105 } 90 106 }
Note:
See TracChangeset
for help on using the changeset viewer.