Changeset 9329 in josm for trunk/src/org
- Timestamp:
- 2016-01-06T17:30:31+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
r9277 r9329 12 12 import java.util.TimeZone; 13 13 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.data.SystemOfMeasurement; 16 import org.openstreetmap.josm.data.coor.CachedLatLon; 17 import org.openstreetmap.josm.data.coor.LatLon; 18 import org.openstreetmap.josm.tools.ExifReader; 19 14 20 import com.drew.imaging.jpeg.JpegMetadataReader; 15 21 import com.drew.lang.CompoundException; … … 19 25 import com.drew.metadata.exif.ExifIFD0Directory; 20 26 import com.drew.metadata.exif.GpsDirectory; 21 import org.openstreetmap.josm.Main;22 import org.openstreetmap.josm.data.SystemOfMeasurement;23 import org.openstreetmap.josm.data.coor.CachedLatLon;24 import org.openstreetmap.josm.data.coor.LatLon;25 import org.openstreetmap.josm.tools.ExifReader;26 27 27 28 /** … … 432 433 * 433 434 * If successful, fills in the LatLon, speed, elevation, image direction, and other attributes 435 * @since 9270 434 436 */ 435 437 public void extractExif() { … … 448 450 dirGps = metadata.getFirstDirectoryOfType(GpsDirectory.class); 449 451 } catch (CompoundException | IOException p) { 452 Main.warn(p); 450 453 setExifCoor(null); 451 454 setPos(null); … … 459 462 } 460 463 } catch (MetadataException ex) { 461 Main.debug(ex.getMessage()); 464 if (Main.isDebugEnabled()) { 465 Main.debug(ex.getMessage()); 466 } 467 } 468 469 // Changed to silently cope with no time info in exif. One case 470 // of person having time that couldn't be parsed, but valid GPS info 471 try { 472 setExifTime(ExifReader.readTime(file)); 473 } catch (ParseException ex) { 474 setExifTime(null); 462 475 } 463 476 … … 481 494 setSpeed(speed); 482 495 } catch (Exception ex) { 483 Main.debug(ex.getMessage()); 496 if (Main.isDebugEnabled()) { 497 Main.debug(ex.getMessage()); 498 } 484 499 } 485 500 … … 492 507 setElevation(ele); 493 508 } catch (MetadataException ex) { 494 Main.debug(ex.getMessage()); 509 if (Main.isDebugEnabled()) { 510 Main.debug(ex.getMessage()); 511 } 495 512 } 496 513 … … 512 529 } 513 530 } catch (Exception ex) { // (CompoundException and other exceptions, e.g. #5271) 514 Main.debug(ex.getMessage()); 515 } 516 517 // Changed to silently cope with no time info in exif. One case 518 // of person having time that couldn't be parsed, but valid GPS info 519 try { 520 setExifTime(ExifReader.readTime(file)); 521 } catch (ParseException ex) { 522 setExifTime(null); 531 if (Main.isDebugEnabled()) { 532 Main.debug(ex.getMessage()); 533 } 523 534 } 524 535
Note:
See TracChangeset
for help on using the changeset viewer.