Changeset 31455 in osm for applications/editors/josm/plugins/mapillary/src/org
- Timestamp:
- 2015-08-05T11:46:38+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java
r31454 r31455 14 14 import org.openstreetmap.josm.data.Bounds; 15 15 import org.openstreetmap.josm.data.coor.LatLon; 16 import org.openstreetmap.josm.gui.layer.OsmDataLayer;17 16 import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer; 18 17 import org.openstreetmap.josm.plugins.mapillary.MapillaryPlugin; -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java
r31445 r31455 72 72 public void run() { 73 73 this.monitor.setCustomText("Downloaded 0/" + this.amount); 74 // File tempFile = null;74 // File tempFile = null; 75 75 BufferedImage img; 76 76 MapillaryAbstractImage mimg = null; … … 100 100 TiffOutputSet outputSet = null; 101 101 TiffOutputDirectory exifDirectory = null; 102 TiffOutputDirectory gpsDirectory = null; 102 103 // If the image is imported, loads the rest of the EXIF data. 103 104 if (mimg instanceof MapillaryImportedImage) { … … 116 117 } 117 118 exifDirectory = outputSet.getOrCreateExifDirectory(); 119 gpsDirectory = outputSet.getOrCreateGPSDirectory(); 118 120 119 exifDirectory 120 .removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF); 121 exifDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF, 121 gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF); 122 gpsDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF, 122 123 GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF_VALUE_TRUE_NORTH); 123 124 124 exifDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION);125 exifDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION,125 gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION); 126 gpsDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION, 126 127 RationalNumber.valueOf(mimg.getCa())); 127 128 … … 137 138 OutputStream os = new BufferedOutputStream(new FileOutputStream( 138 139 finalPath + ".jpg")); 139 new ExifRewriter().updateExifMetadataLossless(imageBytes, os, outputSet); 140 new ExifRewriter() 141 .updateExifMetadataLossless(imageBytes, os, outputSet); 140 142 141 143 os.close(); … … 152 154 153 155 // Increases the progress bar. 154 this.monitor.worked(PleaseWaitProgressMonitor.PROGRESS_BAR_MAX / this.amount); 156 this.monitor.worked(PleaseWaitProgressMonitor.PROGRESS_BAR_MAX 157 / this.amount); 155 158 this.monitor.setCustomText("Downloaded " + (i + 1) + "/" + this.amount); 156 159 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java
r31454 r31455 248 248 TiffOutputSet outputSet = null; 249 249 TiffOutputDirectory exifDirectory = null; 250 TiffOutputDirectory gpsDirectory = null; 250 251 // If the image is imported, loads the rest of the EXIF data. 251 252 ImageMetadata metadata = Imaging.getMetadata(image.getFile()); … … 260 261 outputSet = new TiffOutputSet(); 261 262 } 263 gpsDirectory = outputSet.getOrCreateGPSDirectory(); 262 264 exifDirectory = outputSet.getOrCreateExifDirectory(); 263 265 264 exifDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF);265 exifDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF,266 gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF); 267 gpsDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF, 266 268 GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF_VALUE_TRUE_NORTH); 267 269 268 exifDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION);269 exifDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION,270 gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION); 271 gpsDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION, 270 272 RationalNumber.valueOf(image.getCa())); 271 273
Note:
See TracChangeset
for help on using the changeset viewer.