Class GeoJSONImporter
- java.lang.Object
-
- org.openstreetmap.josm.gui.io.importexport.FileImporter
-
- org.openstreetmap.josm.gui.io.importexport.GeoJSONImporter
-
- All Implemented Interfaces:
Comparable<FileImporter>
public class GeoJSONImporter extends FileImporter
GeoJSON file importer.- Since:
- 15424
-
-
Field Summary
Fields Modifier and Type Field Description private static ExtensionFileFilter
FILE_FILTER
-
Fields inherited from class org.openstreetmap.josm.gui.io.importexport.FileImporter
filter, options
-
-
Constructor Summary
Constructors Constructor Description GeoJSONImporter()
Constructs a new GeoJSON File importer with an extension filter for .json and .geojson
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
importData(File file, ProgressMonitor progressMonitor)
Needs to be implemented if isBatchImporter() returns false.DataSet
parseDataSet(String source)
Parse GeoJSON dataset.-
Methods inherited from class org.openstreetmap.josm.gui.io.importexport.FileImporter
acceptFile, compareTo, getPriority, importData, importDataHandleExceptions, importDataHandleExceptions, isBatchImporter, isEnabled, setEnabled, setOptions
-
-
-
-
Field Detail
-
FILE_FILTER
private static final ExtensionFileFilter FILE_FILTER
-
-
Constructor Detail
-
GeoJSONImporter
public GeoJSONImporter()
Constructs a new GeoJSON File importer with an extension filter for .json and .geojson
-
-
Method Detail
-
importData
public void importData(File file, ProgressMonitor progressMonitor)
Description copied from class:FileImporter
Needs to be implemented if isBatchImporter() returns false.- Overrides:
importData
in classFileImporter
- Parameters:
file
- file to importprogressMonitor
- progress monitor
-
parseDataSet
public DataSet parseDataSet(String source) throws IOException, IllegalDataException
Parse GeoJSON dataset.- Parameters:
source
- geojson file- Returns:
- GeoJSON dataset
- Throws:
IOException
- in case of I/O errorIllegalDataException
- if an error was found while parsing the data from the source
-
-