Class OsmImporter

    • Constructor Detail

      • OsmImporter

        public OsmImporter()
        Constructs a new OsmImporter.
      • OsmImporter

        public OsmImporter​(ExtensionFileFilter filter)
        Constructs a new OsmImporter with the given extension file filter.
        Parameters:
        filter - The extension file filter
    • Method Detail

      • importData

        protected void importData​(java.io.InputStream in,
                                  java.io.File associatedFile,
                                  ProgressMonitor pm)
                           throws IllegalDataException
        Imports OSM data from stream
        Parameters:
        in - input stream
        associatedFile - filename of data (layer name will be generated from name of file)
        pm - handler for progress monitoring and canceling
        Throws:
        IllegalDataException - if an error was found while parsing the OSM data
      • loadLayer

        public OsmImporter.OsmImporterData loadLayer​(java.io.InputStream in,
                                                     java.io.File associatedFile,
                                                     java.lang.String layerName,
                                                     ProgressMonitor progressMonitor)
                                              throws IllegalDataException
        Load osm data layer from InputStream.
        Parameters:
        in - input stream
        associatedFile - filename of data (can be null if the stream does not come from a file)
        layerName - name of generated layer
        progressMonitor - handler for progress monitoring and canceling
        Returns:
        Utility class containing imported OSM layer, and a task to run after it is added to MapView
        Throws:
        IllegalDataException - if an error was found while parsing the OSM data