Ignore:
Timestamp:
2015-08-05T11:46:38+02:00 (9 years ago)
Author:
nokutu
Message:

Fixed test errors

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  
    1414import org.openstreetmap.josm.data.Bounds;
    1515import org.openstreetmap.josm.data.coor.LatLon;
    16 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1716import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer;
    1817import org.openstreetmap.josm.plugins.mapillary.MapillaryPlugin;
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java

    r31445 r31455  
    7272  public void run() {
    7373    this.monitor.setCustomText("Downloaded 0/" + this.amount);
    74     //File tempFile = null;
     74    // File tempFile = null;
    7575    BufferedImage img;
    7676    MapillaryAbstractImage mimg = null;
     
    100100        TiffOutputSet outputSet = null;
    101101        TiffOutputDirectory exifDirectory = null;
     102        TiffOutputDirectory gpsDirectory = null;
    102103        // If the image is imported, loads the rest of the EXIF data.
    103104        if (mimg instanceof MapillaryImportedImage) {
     
    116117        }
    117118        exifDirectory = outputSet.getOrCreateExifDirectory();
     119        gpsDirectory = outputSet.getOrCreateGPSDirectory();
    118120
    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,
    122123            GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF_VALUE_TRUE_NORTH);
    123124
    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,
    126127            RationalNumber.valueOf(mimg.getCa()));
    127128
     
    137138        OutputStream os = new BufferedOutputStream(new FileOutputStream(
    138139            finalPath + ".jpg"));
    139         new ExifRewriter().updateExifMetadataLossless(imageBytes, os, outputSet);
     140        new ExifRewriter()
     141            .updateExifMetadataLossless(imageBytes, os, outputSet);
    140142
    141143        os.close();
     
    152154
    153155      // 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);
    155158      this.monitor.setCustomText("Downloaded " + (i + 1) + "/" + this.amount);
    156159    }
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java

    r31454 r31455  
    248248    TiffOutputSet outputSet = null;
    249249    TiffOutputDirectory exifDirectory = null;
     250    TiffOutputDirectory gpsDirectory = null;
    250251    // If the image is imported, loads the rest of the EXIF data.
    251252    ImageMetadata metadata = Imaging.getMetadata(image.getFile());
     
    260261      outputSet = new TiffOutputSet();
    261262    }
     263    gpsDirectory = outputSet.getOrCreateGPSDirectory();
    262264    exifDirectory = outputSet.getOrCreateExifDirectory();
    263265
    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,
    266268        GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF_VALUE_TRUE_NORTH);
    267269
    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,
    270272        RationalNumber.valueOf(image.getCa()));
    271273
Note: See TracChangeset for help on using the changeset viewer.