Changeset 27300 in osm for applications/editors/josm/plugins/pbf
- Timestamp:
- 2011-12-21T20:39:21+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/pbf
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pbf/build.xml
r27001 r27300 32 32 <property name="commit.message" value="Commit message"/> 33 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="4 574"/>34 <property name="plugin.main.version" value="4687"/> 35 35 <!-- should not be necessary to change the following properties --> 36 36 <property name="josm" location="../../core/dist/josm-custom.jar"/> -
applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfImporter.java
r26961 r27300 16 16 package org.openstreetmap.josm.plugins.pbf.io; 17 17 18 import java.io.File;19 18 import java.io.IOException; 20 19 import java.io.InputStream; 21 20 22 21 import org.openstreetmap.josm.data.osm.DataSet; 23 import org.openstreetmap.josm.gui.layer.OsmDataLayer;24 22 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 23 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 25 24 import org.openstreetmap.josm.io.IllegalDataException; 26 25 import org.openstreetmap.josm.io.MirroredInputStream; … … 38 37 super(FILE_FILTER); 39 38 } 39 40 /* (non-Javadoc) 41 * @see org.openstreetmap.josm.io.OsmImporter#parseDataSet(java.io.InputStream, org.openstreetmap.josm.gui.progress.ProgressMonitor) 42 */ 43 @Override 44 protected DataSet parseDataSet(InputStream in, ProgressMonitor progressMonitor) throws IllegalDataException { 45 return PbfReader.parseDataSet(in, progressMonitor); 46 } 40 47 41 /* (non-Javadoc)42 * @see org.openstreetmap.josm.io.OsmImporter#importData(java.io.InputStream, java.io.File)43 */44 @Override45 protected void importData(InputStream in, File associatedFile) throws IllegalDataException {46 final DataSet dataSet = PbfReader.parseDataSet(in, NullProgressMonitor.INSTANCE);47 final OsmDataLayer layer = new OsmDataLayer(dataSet, associatedFile.getName(), associatedFile);48 addDataLayer(dataSet, layer, associatedFile.getPath());49 }50 51 48 protected DataSet parseDataSet(final String source) throws IOException, SAXException, IllegalDataException { 52 return PbfReader.parseDataSet(new MirroredInputStream(source), NullProgressMonitor.INSTANCE);49 return parseDataSet(new MirroredInputStream(source), NullProgressMonitor.INSTANCE); 53 50 } 54 51 }
Note:
See TracChangeset
for help on using the changeset viewer.