Changeset 8132 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2015-03-10T01:17:39+01:00 (10 years ago)
- 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 627 627 628 628 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); 631 631 if (speedRef != null) { 632 632 if (speedRef.equalsIgnoreCase("M")) { … … 645 645 646 646 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); 649 649 if (d == 1) { 650 650 ele *= -1; … … 679 679 // 2) GPS_DATE_STAMP not set -> use EXIF date or set to default 680 680 // 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); 682 682 if (timeStampComps != null) { 683 683 int gpsHour = timeStampComps[0]; … … 688 688 // We have the time. Next step is to check if the GPS date stamp is set. 689 689 // 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); 691 691 if (dateStampStr != null && dateStampStr.matches("^\\d+:\\d+:\\d+$")) { 692 692 String[] dateStampComps = dateStampStr.split(":"); -
trunk/src/org/openstreetmap/josm/tools/ExifReader.java
r7956 r8132 2 2 package org.openstreetmap.josm.tools; 3 3 4 import java.awt.geom.AffineTransform; 4 5 import java.io.File; 5 6 import java.io.IOException; … … 21 22 import com.drew.metadata.exif.ExifSubIFDDirectory; 22 23 import com.drew.metadata.exif.GpsDirectory; 23 import java.awt.geom.AffineTransform;24 24 25 25 /** … … 125 125 public static LatLon readLatLon(GpsDirectory dirGps) throws MetadataException { 126 126 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'); 129 129 return new LatLon(lat, lon); 130 130 } … … 159 159 public static Double readDirection(GpsDirectory dirGps) { 160 160 if (dirGps != null) { 161 Rational direction = dirGps.getRational(GpsDirectory.TAG_ GPS_IMG_DIRECTION);161 Rational direction = dirGps.getRational(GpsDirectory.TAG_IMG_DIRECTION); 162 162 if (direction != null) { 163 163 return direction.doubleValue();
Note:
See TracChangeset
for help on using the changeset viewer.