Changeset 8132 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2015-03-10T01:17:39+01:00 (10 years ago)
Author:
Don-vip
Message:

fix #11162 - update to metadata-extractor 2.7.2

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r8126 r8132  
    627627
    628628        try {
    629             double speed = dirGps.getDouble(GpsDirectory.TAG_GPS_SPEED);
    630             String speedRef = dirGps.getString(GpsDirectory.TAG_GPS_SPEED_REF);
     629            double speed = dirGps.getDouble(GpsDirectory.TAG_SPEED);
     630            String speedRef = dirGps.getString(GpsDirectory.TAG_SPEED_REF);
    631631            if (speedRef != null) {
    632632                if (speedRef.equalsIgnoreCase("M")) {
     
    645645
    646646        try {
    647             double ele = dirGps.getDouble(GpsDirectory.TAG_GPS_ALTITUDE);
    648             int d = dirGps.getInt(GpsDirectory.TAG_GPS_ALTITUDE_REF);
     647            double ele = dirGps.getDouble(GpsDirectory.TAG_ALTITUDE);
     648            int d = dirGps.getInt(GpsDirectory.TAG_ALTITUDE_REF);
    649649            if (d == 1) {
    650650                ele *= -1;
     
    679679        // 2) GPS_DATE_STAMP not set -> use EXIF date or set to default
    680680        // 3) GPS_TIME_STAMP and GPS_DATE_STAMP are set
    681         int[] timeStampComps = dirGps.getIntArray(GpsDirectory.TAG_GPS_TIME_STAMP);
     681        int[] timeStampComps = dirGps.getIntArray(GpsDirectory.TAG_TIME_STAMP);
    682682        if (timeStampComps != null) {
    683683            int gpsHour = timeStampComps[0];
     
    688688            // We have the time. Next step is to check if the GPS date stamp is set.
    689689            // dirGps.getString() always succeeds, but the return value might be null.
    690             String dateStampStr = dirGps.getString(GpsDirectory.TAG_GPS_DATE_STAMP);
     690            String dateStampStr = dirGps.getString(GpsDirectory.TAG_DATE_STAMP);
    691691            if (dateStampStr != null && dateStampStr.matches("^\\d+:\\d+:\\d+$")) {
    692692                String[] dateStampComps = dateStampStr.split(":");
  • trunk/src/org/openstreetmap/josm/tools/ExifReader.java

    r7956 r8132  
    22package org.openstreetmap.josm.tools;
    33
     4import java.awt.geom.AffineTransform;
    45import java.io.File;
    56import java.io.IOException;
     
    2122import com.drew.metadata.exif.ExifSubIFDDirectory;
    2223import com.drew.metadata.exif.GpsDirectory;
    23 import java.awt.geom.AffineTransform;
    2424
    2525/**
     
    125125    public static LatLon readLatLon(GpsDirectory dirGps) throws MetadataException {
    126126        if (dirGps != null) {
    127             double lat = readAxis(dirGps, GpsDirectory.TAG_GPS_LATITUDE, GpsDirectory.TAG_GPS_LATITUDE_REF, 'S');
    128             double lon = readAxis(dirGps, GpsDirectory.TAG_GPS_LONGITUDE, GpsDirectory.TAG_GPS_LONGITUDE_REF, 'W');
     127            double lat = readAxis(dirGps, GpsDirectory.TAG_LATITUDE, GpsDirectory.TAG_LATITUDE_REF, 'S');
     128            double lon = readAxis(dirGps, GpsDirectory.TAG_LONGITUDE, GpsDirectory.TAG_LONGITUDE_REF, 'W');
    129129            return new LatLon(lat, lon);
    130130        }
     
    159159    public static Double readDirection(GpsDirectory dirGps) {
    160160        if (dirGps != null) {
    161             Rational direction = dirGps.getRational(GpsDirectory.TAG_GPS_IMG_DIRECTION);
     161            Rational direction = dirGps.getRational(GpsDirectory.TAG_IMG_DIRECTION);
    162162            if (direction != null) {
    163163                return direction.doubleValue();
Note: See TracChangeset for help on using the changeset viewer.