public class GpxImporter extends FileImporter
| Modifier and Type | Class and Description |
|---|---|
static class |
GpxImporter.GpxImporterData
Utility class containing imported GPX and marker layers, and a task to run after they are added to MapView.
|
| Modifier and Type | Field and Description |
|---|---|
static ExtensionFileFilter |
FILE_FILTER
The GPX file filter (*.gpx and *.gpx.gz files).
|
filter| Constructor and Description |
|---|
GpxImporter()
Constructs a new
GpxImporter. |
| Modifier and Type | Method and Description |
|---|---|
static void |
addLayers(GpxImporter.GpxImporterData data)
Adds the specified GPX and marker layers to Map.main
|
void |
importData(File file,
ProgressMonitor progressMonitor)
Needs to be implemented if isBatchImporter() returns false.
|
static GpxImporter.GpxImporterData |
loadLayers(GpxData data,
boolean parsedProperly,
String gpxLayerName,
String markerLayerName)
Replies the new GPX and marker layers corresponding to the specified GPX data.
|
static GpxImporter.GpxImporterData |
loadLayers(InputStream is,
File associatedFile,
String gpxLayerName,
String markerLayerName,
ProgressMonitor progressMonitor) |
acceptFile, activeLayerChange, compareTo, getPriority, importData, importDataHandleExceptions, importDataHandleExceptions, isBatchImporter, isEnabled, layerAdded, layerRemoved, setEnabledpublic static final ExtensionFileFilter FILE_FILTER
public GpxImporter()
GpxImporter.public void importData(File file, ProgressMonitor progressMonitor) throws IOException
FileImporterimportData in class FileImporterfile - file to importprogressMonitor - progress monitorIOException - if any I/O error occurspublic static void addLayers(GpxImporter.GpxImporterData data)
data - The layers to addloadLayers(org.openstreetmap.josm.data.gpx.GpxData, boolean, java.lang.String, java.lang.String)public static GpxImporter.GpxImporterData loadLayers(GpxData data, boolean parsedProperly, String gpxLayerName, String markerLayerName)
data - The GPX dataparsedProperly - True if GPX data has been properly parsed by GpxReader.parse(boolean)gpxLayerName - The GPX layer namemarkerLayerName - The marker layer nameaddLayers(org.openstreetmap.josm.io.GpxImporter.GpxImporterData)addLayers(org.openstreetmap.josm.io.GpxImporter.GpxImporterData)public static GpxImporter.GpxImporterData loadLayers(InputStream is, File associatedFile, String gpxLayerName, String markerLayerName, ProgressMonitor progressMonitor) throws IOException
IOException