diff --git a/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java b/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java
index d5a1d71fa6..b8de9a5bbd 100644
|
a
|
b
|
public final class GpxImageCorrelation {
|
| 76 | 76 | final GpxImageDirectionPositionSettings dirpos = settings.getDirectionPositionSettings(); |
| 77 | 77 | final GpxImageDatumSettings datumSettings = settings.getDatumSettings(); |
| 78 | 78 | final long offset = settings.getOffset(); |
| | 79 | final TimeSource imgTimeSource = settings.getImgTimeSource(); |
| 79 | 80 | |
| 80 | 81 | boolean isFirst = true; |
| 81 | 82 | long prevWpTime = 0; |
| … |
… |
public final class GpxImageCorrelation {
|
| 144 | 145 | } |
| 145 | 146 | } |
| 146 | 147 | WayPoint nextWp = i < size - 1 ? wps.get(i + 1) : null; |
| 147 | | ret += matchPoints(images, prevWp, prevWpTime, curWp, curWpTime, offset, |
| | 148 | ret += matchPoints(images, prevWp, prevWpTime, curWp, curWpTime, imgTimeSource, offset, |
| 148 | 149 | interpolate, tagTime, nextWp, dirpos, datumSettings); |
| 149 | 150 | prevWp = curWp; |
| 150 | 151 | prevWpTime = curWpTime; |
| … |
… |
public final class GpxImageCorrelation {
|
| 152 | 153 | } |
| 153 | 154 | } |
| 154 | 155 | if (trkTag && prevWp != null) { |
| 155 | | ret += matchPoints(images, prevWp, prevWpTime, prevWp, prevWpTime, offset, |
| | 156 | ret += matchPoints(images, prevWp, prevWpTime, prevWp, prevWpTime, imgTimeSource, offset, |
| 156 | 157 | false, trkTagTime, null, dirpos, datumSettings); |
| 157 | 158 | } |
| 158 | 159 | Logging.debug("Correlated {0} total points", ret); |
| … |
… |
public final class GpxImageCorrelation {
|
| 361 | 362 | long prevWpTime, |
| 362 | 363 | WayPoint curWp, |
| 363 | 364 | long curWpTime, |
| | 365 | TimeSource imgTimeSource, |
| 364 | 366 | long offset, |
| 365 | 367 | boolean interpolate, |
| 366 | 368 | int tagTime, |
| … |
… |
public final class GpxImageCorrelation {
|
| 375 | 377 | if (isLast) { |
| 376 | 378 | i = images.size() - 1; |
| 377 | 379 | } else { |
| 378 | | i = getLastIndexOfListBefore(images, curWpTime); |
| | 380 | i = getLastIndexOfListBefore(images, curWpTime, imgTimeSource); |
| 379 | 381 | } |
| 380 | 382 | |
| 381 | 383 | if (Logging.isDebugEnabled()) { |
| … |
… |
public final class GpxImageCorrelation {
|
| 426 | 428 | while (i >= 0) { |
| 427 | 429 | final GpxImageEntry curImg = images.get(i); |
| 428 | 430 | final GpxImageEntry curTmp = curImg.getTmp(); |
| 429 | | final long time = curImg.getExifInstant().toEpochMilli(); |
| | 431 | final long time = curImg.getThisInstant(imgTimeSource).toEpochMilli(); |
| 430 | 432 | if ((!isLast && time > curWpTime) || time < prevWpTime) { |
| 431 | 433 | break; |
| 432 | 434 | } |
| … |
… |
public final class GpxImageCorrelation {
|
| 459 | 461 | LatLon nextCoorForDirection = nextWp.getCoor(); |
| 460 | 462 | while (i >= 0) { |
| 461 | 463 | final GpxImageEntry curImg = images.get(i); |
| 462 | | final long imgTime = curImg.getExifInstant().toEpochMilli(); |
| | 464 | final long imgTime = curImg.getThisInstant(imgTimeSource).toEpochMilli(); |
| 463 | 465 | if (imgTime < prevWpTime) { |
| 464 | 466 | break; |
| 465 | 467 | } |
| … |
… |
public final class GpxImageCorrelation {
|
| 547 | 549 | curTmp.setExifGpsDatum("WGS-84"); |
| 548 | 550 | } |
| 549 | 551 | |
| 550 | | curTmp.setGpsTime(curImg.getExifInstant().minusMillis(offset)); |
| | 552 | curTmp.setGpsTime(curImg.getThisInstant(imgTimeSource).minusMillis(offset)); |
| 551 | 553 | curTmp.flagNewGpsData(); |
| 552 | 554 | curImg.tmpUpdated(); |
| 553 | 555 | |
| … |
… |
public final class GpxImageCorrelation {
|
| 578 | 580 | * @param searchedTime time to search |
| 579 | 581 | * @return index of last image before given time |
| 580 | 582 | */ |
| 581 | | private static int getLastIndexOfListBefore(List<? extends GpxImageEntry> images, long searchedTime) { |
| | 583 | private static int getLastIndexOfListBefore(List<? extends GpxImageEntry> images, long searchedTime, TimeSource imgTimeSource) { |
| 582 | 584 | int lstSize = images.size(); |
| 583 | 585 | |
| 584 | 586 | // No photos or the first photo taken is later than the search period |
| 585 | | if (lstSize == 0 || searchedTime < images.get(0).getExifInstant().toEpochMilli()) |
| | 587 | if (lstSize == 0 || searchedTime < images.get(0).getThisInstant(imgTimeSource).toEpochMilli()) |
| 586 | 588 | return -1; |
| 587 | 589 | |
| 588 | 590 | // The search period is later than the last photo |
| 589 | | if (searchedTime > images.get(lstSize - 1).getExifInstant().toEpochMilli()) |
| | 591 | if (searchedTime > images.get(lstSize - 1).getThisInstant(imgTimeSource).toEpochMilli()) |
| 590 | 592 | return lstSize-1; |
| 591 | 593 | |
| 592 | 594 | // The searched index is somewhere in the middle, do a binary search from the beginning |
| … |
… |
public final class GpxImageCorrelation {
|
| 595 | 597 | int endIndex = lstSize-1; |
| 596 | 598 | while (endIndex - startIndex > 1) { |
| 597 | 599 | curIndex = (endIndex + startIndex) / 2; |
| 598 | | if (searchedTime > images.get(curIndex).getExifInstant().toEpochMilli()) { |
| | 600 | if (searchedTime > images.get(curIndex).getThisInstant(imgTimeSource).toEpochMilli()) { |
| 599 | 601 | startIndex = curIndex; |
| 600 | 602 | } else { |
| 601 | 603 | endIndex = curIndex; |
| 602 | 604 | } |
| 603 | 605 | } |
| 604 | | if (searchedTime < images.get(endIndex).getExifInstant().toEpochMilli()) |
| | 606 | if (searchedTime < images.get(endIndex).getThisInstant(imgTimeSource).toEpochMilli()) |
| 605 | 607 | return startIndex; |
| 606 | 608 | |
| 607 | 609 | // This final loop is to check if photos with the exact same EXIF time follows |
| 608 | | while ((endIndex < (lstSize - 1)) && (images.get(endIndex).getExifInstant().toEpochMilli() |
| 609 | | == images.get(endIndex + 1).getExifInstant().toEpochMilli())) { |
| | 610 | while ((endIndex < (lstSize - 1)) && (images.get(endIndex).getThisInstant(imgTimeSource).toEpochMilli() |
| | 611 | == images.get(endIndex + 1).getThisInstant(imgTimeSource).toEpochMilli())) { |
| 610 | 612 | endIndex++; |
| 611 | 613 | } |
| 612 | 614 | return endIndex; |
diff --git a/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelationSettings.java b/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelationSettings.java
index 5e2d9ef699..292ba46805 100644
|
a
|
b
|
public class GpxImageCorrelationSettings {
|
| 11 | 11 | |
| 12 | 12 | private final long offset; |
| 13 | 13 | private final boolean forceTags; |
| | 14 | private final TimeSource imgTimeSource; |
| 14 | 15 | private final GpxImageDirectionPositionSettings directionPositionSettings; |
| 15 | 16 | private final GpxImageDatumSettings datumSettings; |
| 16 | 17 | |
| … |
… |
public class GpxImageCorrelationSettings {
|
| 20 | 21 | * @param forceTags force tagging of all photos, otherwise prefs are used |
| 21 | 22 | */ |
| 22 | 23 | public GpxImageCorrelationSettings(long offset, boolean forceTags) { |
| 23 | | this(offset, forceTags, |
| | 24 | this(offset, forceTags, TimeSource.EXIFCAMTIME, |
| 24 | 25 | new GpxImageDirectionPositionSettings(false, 0, false, 0, 0, 0), |
| 25 | 26 | new GpxImageDatumSettings(false, null) |
| 26 | 27 | ); |
| … |
… |
public class GpxImageCorrelationSettings {
|
| 30 | 31 | * Constructs a new {@code GpxImageCorrelationSettings}. |
| 31 | 32 | * @param offset offset in milliseconds |
| 32 | 33 | * @param forceTags force tagging of all photos, otherwise prefs are used |
| | 34 | * @param imgTimeSource select image clock source: |
| | 35 | * "exifCamTime" for camera internal clock |
| | 36 | * "exifGpsTime for the GPS clock of the camera |
| 33 | 37 | * @param directionPositionSettings direction/position settings |
| | 38 | * @since xxx @imgTimeSource was added |
| 34 | 39 | */ |
| 35 | | public GpxImageCorrelationSettings(long offset, boolean forceTags, |
| | 40 | public GpxImageCorrelationSettings(long offset, boolean forceTags, TimeSource imgTimeSource, |
| 36 | 41 | GpxImageDirectionPositionSettings directionPositionSettings) { |
| 37 | | this(offset, forceTags, directionPositionSettings, |
| | 42 | this(offset, forceTags, imgTimeSource, directionPositionSettings, |
| 38 | 43 | new GpxImageDatumSettings(false, null)); |
| 39 | 44 | } |
| 40 | 45 | |
| … |
… |
public class GpxImageCorrelationSettings {
|
| 42 | 47 | * Constructs a new {@code GpxImageCorrelationSettings}. |
| 43 | 48 | * @param offset offset in milliseconds |
| 44 | 49 | * @param forceTags force tagging of all photos, otherwise prefs are used |
| | 50 | * @param imgTimeSource select image clock source: |
| | 51 | * "exifCamTime" for camera internal clock |
| | 52 | * "exifGpsTime for the GPS clock of the camera |
| 45 | 53 | * @param directionPositionSettings direction/position settings |
| 46 | 54 | * @param datumSettings GPS datum settings |
| 47 | 55 | * @since 19387 @datumSettings was added |
| | 56 | * @since xxx @imgTimeSource was added |
| 48 | 57 | */ |
| 49 | | public GpxImageCorrelationSettings(long offset, boolean forceTags, |
| | 58 | public GpxImageCorrelationSettings(long offset, boolean forceTags, TimeSource imgTimeSource, |
| 50 | 59 | GpxImageDirectionPositionSettings directionPositionSettings, |
| 51 | 60 | GpxImageDatumSettings datumSettings) { |
| 52 | 61 | this.offset = offset; |
| 53 | 62 | this.forceTags = forceTags; |
| | 63 | this.imgTimeSource = imgTimeSource; |
| 54 | 64 | this.directionPositionSettings = Objects.requireNonNull(directionPositionSettings); |
| 55 | 65 | this.datumSettings = Objects.requireNonNull(datumSettings); |
| 56 | 66 | } |
| … |
… |
public class GpxImageCorrelationSettings {
|
| 71 | 81 | return forceTags; |
| 72 | 82 | } |
| 73 | 83 | |
| | 84 | /** |
| | 85 | * Return the selected image clock source, which is camera internal time, or GPS time |
| | 86 | * @return the clock source |
| | 87 | * @since xxx |
| | 88 | */ |
| | 89 | public TimeSource getImgTimeSource() { |
| | 90 | return imgTimeSource; |
| | 91 | } |
| | 92 | |
| 74 | 93 | /** |
| 75 | 94 | * Returns the direction/position settings. |
| 76 | 95 | * @return the direction/position settings |
| … |
… |
public class GpxImageCorrelationSettings {
|
| 91 | 110 | @Override |
| 92 | 111 | public String toString() { |
| 93 | 112 | return "[offset=" + offset + ", forceTags=" + forceTags |
| | 113 | + ", clock source=" + imgTimeSource |
| 94 | 114 | + ", directionPositionSettings=" + directionPositionSettings |
| 95 | 115 | + ", datumSettings=" + datumSettings + ']'; |
| 96 | 116 | } |
diff --git a/src/org/openstreetmap/josm/data/gpx/GpxImageEntry.java b/src/org/openstreetmap/josm/data/gpx/GpxImageEntry.java
index 9842da34c8..9f2072b15d 100644
|
a
|
b
|
public class GpxImageEntry implements Comparable<GpxImageEntry>, IQuadBucketType
|
| 336 | 336 | return exifGpsTime != null; |
| 337 | 337 | } |
| 338 | 338 | |
| | 339 | /** |
| | 340 | * Return the time value selected with the parameter. |
| | 341 | * @param timeSource the wanted time value, exifCamTime or exifGpsTime |
| | 342 | * @return exifInstant or exifGpsInstant value |
| | 343 | * @since xxx |
| | 344 | */ |
| | 345 | @Override |
| | 346 | public Instant getThisInstant(TimeSource timeSource) { |
| | 347 | switch (timeSource) { |
| | 348 | case EXIFGPSTIME: |
| | 349 | return getExifGpsInstant(); |
| | 350 | case EXIFCAMTIME: |
| | 351 | return getExifInstant(); |
| | 352 | } |
| | 353 | return null; |
| | 354 | } |
| | 355 | |
| 339 | 356 | private static Date getDefensiveDate(Instant date) { |
| 340 | 357 | if (date == null) |
| 341 | 358 | return null; |
diff --git a/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java b/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
index 14d7b3f843..43bfaac1aa 100644
|
a
|
b
|
import java.util.function.Consumer;
|
| 32 | 32 | |
| 33 | 33 | import javax.swing.AbstractAction; |
| 34 | 34 | import javax.swing.BorderFactory; |
| | 35 | import javax.swing.ButtonGroup; |
| 35 | 36 | import javax.swing.DefaultComboBoxModel; |
| 36 | 37 | import javax.swing.JButton; |
| 37 | 38 | import javax.swing.JCheckBox; |
| 38 | 39 | import javax.swing.JLabel; |
| 39 | 40 | import javax.swing.JOptionPane; |
| 40 | 41 | import javax.swing.JPanel; |
| | 42 | import javax.swing.JRadioButton; |
| 41 | 43 | import javax.swing.JSeparator; |
| 42 | 44 | import javax.swing.SwingConstants; |
| 43 | 45 | import javax.swing.event.ChangeEvent; |
| … |
… |
import org.openstreetmap.josm.data.gpx.GpxImageCorrelationSettings;
|
| 56 | 58 | import org.openstreetmap.josm.data.gpx.GpxImageDatumSettings; |
| 57 | 59 | import org.openstreetmap.josm.data.gpx.GpxTimeOffset; |
| 58 | 60 | import org.openstreetmap.josm.data.gpx.GpxTimezone; |
| | 61 | import org.openstreetmap.josm.data.gpx.TimeSource; |
| 59 | 62 | import org.openstreetmap.josm.data.gpx.WayPoint; |
| 60 | 63 | import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; |
| 61 | 64 | import org.openstreetmap.josm.gui.ExtendedDialog; |
| … |
… |
public class CorrelateGpxWithImages extends AbstractAction implements ExpertMode
|
| 88 | 91 | |
| 89 | 92 | private static JosmComboBoxModel<GpxDataWrapper> gpxModel; |
| 90 | 93 | private static boolean forceTags; |
| | 94 | private static TimeSource imgTimeSource; |
| 91 | 95 | |
| 92 | 96 | private final transient GeoImageLayer yLayer; |
| 93 | 97 | private transient CorrelationSupportLayer supportLayer; |
| … |
… |
public class CorrelateGpxWithImages extends AbstractAction implements ExpertMode
|
| 253 | 257 | private JButton buttonSupport; |
| 254 | 258 | private JosmTextField tfTimezone; |
| 255 | 259 | private JosmTextField tfOffset; |
| | 260 | private JRadioButton rbTimeFromCamera; |
| | 261 | private JRadioButton rbTimeFromGps; |
| 256 | 262 | private JCheckBox cbExifImg; |
| 257 | 263 | private JCheckBox cbTaggedImg; |
| 258 | 264 | private JCheckBox cbShowThumbs; |
| … |
… |
public class CorrelateGpxWithImages extends AbstractAction implements ExpertMode
|
| 520 | 526 | tfOffset = new JosmTextField(10); |
| 521 | 527 | tfOffset.setText(delta.formatOffset()); |
| 522 | 528 | |
| | 529 | // Image Time/Clock source choice |
| | 530 | rbTimeFromCamera = new JRadioButton(tr("Camera clock")); |
| | 531 | rbTimeFromCamera.setSelected(true); |
| | 532 | rbTimeFromGps = new JRadioButton(tr("Camera GPS clock")); |
| | 533 | ButtonGroup timeSourceGroup = new ButtonGroup(); |
| | 534 | timeSourceGroup.add(rbTimeFromCamera); |
| | 535 | timeSourceGroup.add(rbTimeFromGps); |
| | 536 | |
| 523 | 537 | JButton buttonViewGpsPhoto = new JButton(tr("<html>Use photo of an accurate clock,<br>e.g. GPS receiver display</html>")); |
| 524 | 538 | buttonViewGpsPhoto.setIcon(ImageProvider.get("clock")); |
| 525 | 539 | buttonViewGpsPhoto.addActionListener(new SetOffsetActionListener()); |
| … |
… |
public class CorrelateGpxWithImages extends AbstractAction implements ExpertMode
|
| 586 | 600 | gbc.gridx = 3; |
| 587 | 601 | panelTf.add(buttonAdjust, gbc); |
| 588 | 602 | |
| | 603 | // Image time source choice |
| | 604 | gbc = GBC.eol(); |
| | 605 | gbc.gridx = 0; |
| | 606 | gbc.gridy = y++; |
| | 607 | panelTf.add(new JLabel(tr("Image time source:")), gbc); |
| | 608 | |
| | 609 | gbc = GBC.eol(); |
| | 610 | gbc.gridx = 1; |
| | 611 | gbc.gridy = y++; |
| | 612 | panelTf.add(rbTimeFromCamera, gbc); |
| | 613 | |
| | 614 | gbc = GBC.eol(); |
| | 615 | gbc.gridx = 1; |
| | 616 | gbc.gridy = y++; |
| | 617 | panelTf.add(rbTimeFromGps, gbc); |
| | 618 | |
| 589 | 619 | gbc = GBC.eol().grid(0, y++).fill(GridBagConstraints.HORIZONTAL).insets(0, 12, 0, 0); |
| 590 | 620 | panelTf.add(new JSeparator(SwingConstants.HORIZONTAL), gbc); |
| 591 | 621 | panelTf.add(labelPosition, GBC.eol().grid(0, y++)); |
| … |
… |
public class CorrelateGpxWithImages extends AbstractAction implements ExpertMode
|
| 619 | 649 | //TODO An AutoCompComboBox would be nice to list the recent datum values. I don't have the skill to add it. |
| 620 | 650 | tfDatum = new JosmTextField(loadGpsDatum(), 8); |
| 621 | 651 | tfDatum.setToolTipText(tr("<html>Enter the datum for your images coordinates. Default value is WGS-84.<br>" + |
| 622 | | "For RTK it could be your local CRS epsg code.<br>(e.g. EPSG:9782 for France mainland.)</html>")); |
| | 652 | "For RTK it could be your local CRS epsg code.<br>(e.g. EPSG:9781 for France mainland.)</html>")); |
| 623 | 653 | tfDatum.setEnabled(false); |
| 624 | 654 | |
| 625 | 655 | expertPanel.add(labelExtTags, GBC.eol().grid(0, 1)); |
| … |
… |
public class CorrelateGpxWithImages extends AbstractAction implements ExpertMode
|
| 651 | 681 | |
| 652 | 682 | tfTimezone.getDocument().addDocumentListener(statusBarUpdater); |
| 653 | 683 | tfOffset.getDocument().addDocumentListener(statusBarUpdater); |
| | 684 | rbTimeFromCamera.addItemListener(statusBarUpdaterWithRepaint); |
| | 685 | rbTimeFromGps.addItemListener(statusBarUpdaterWithRepaint); |
| 654 | 686 | cbExifImg.addItemListener(statusBarUpdaterWithRepaint); |
| 655 | 687 | cbTaggedImg.addItemListener(statusBarUpdaterWithRepaint); |
| 656 | 688 | cbAddGpsDatum.addItemListener(statusBarUpdaterWithRepaint); |
| … |
… |
public class CorrelateGpxWithImages extends AbstractAction implements ExpertMode
|
| 783 | 815 | return e.getMessage(); |
| 784 | 816 | } |
| 785 | 817 | |
| | 818 | // Set image time source from the radio button status |
| | 819 | if (rbTimeFromGps.isSelected()) { |
| | 820 | imgTimeSource = TimeSource.EXIFGPSTIME; |
| | 821 | } else { |
| | 822 | imgTimeSource = TimeSource.EXIFCAMTIME; |
| | 823 | } |
| | 824 | |
| 786 | 825 | // The selection of images we are about to correlate may have changed. |
| 787 | 826 | // So reset all images. |
| 788 | 827 | yLayer.discardTmp(); |
| … |
… |
public class CorrelateGpxWithImages extends AbstractAction implements ExpertMode
|
| 799 | 838 | final long offsetMs = ((long) (timezone.getHours() * TimeUnit.HOURS.toMillis(1))) + delta.getMilliseconds(); // in milliseconds |
| 800 | 839 | lastNumMatched = GpxImageCorrelation.matchGpxTrack(dateImgLst, selGpx.data, |
| 801 | 840 | pDirectionPosition.isVisible() ? |
| 802 | | new GpxImageCorrelationSettings(offsetMs, forceTags, pDirectionPosition.getSettings(), |
| | 841 | new GpxImageCorrelationSettings(offsetMs, forceTags, imgTimeSource, pDirectionPosition.getSettings(), |
| 803 | 842 | new GpxImageDatumSettings(cbAddGpsDatum.isSelected(), tfDatum.getText())) : |
| 804 | 843 | new GpxImageCorrelationSettings(offsetMs, forceTags)); |
| 805 | 844 | |
diff --git a/src/org/openstreetmap/josm/gui/layer/geoimage/EditImagesSequenceAction.java b/src/org/openstreetmap/josm/gui/layer/geoimage/EditImagesSequenceAction.java
index ee93220b87..6d84ef2310 100644
|
a
|
b
|
import javax.swing.event.ChangeListener;
|
| 16 | 16 | import org.openstreetmap.josm.actions.JosmAction; |
| 17 | 17 | import org.openstreetmap.josm.data.gpx.GpxImageCorrelation; |
| 18 | 18 | import org.openstreetmap.josm.data.gpx.GpxImageCorrelationSettings; |
| | 19 | import org.openstreetmap.josm.data.gpx.TimeSource; |
| 19 | 20 | import org.openstreetmap.josm.gui.ExtendedDialog; |
| 20 | 21 | import org.openstreetmap.josm.gui.MainApplication; |
| 21 | 22 | import org.openstreetmap.josm.gui.layer.geoimage.CorrelateGpxWithImages.RepaintTheMapListener; |
| … |
… |
public class EditImagesSequenceAction extends JosmAction {
|
| 82 | 83 | // Create a temporary copy for each image |
| 83 | 84 | dateImgLst.forEach(ie -> ie.createTmp().unflagNewGpsData()); |
| 84 | 85 | GpxImageCorrelation.matchGpxTrack(dateImgLst, yLayer.getFauxGpxData(), |
| 85 | | new GpxImageCorrelationSettings(0, false, pDirectionPosition.getSettings())); |
| | 86 | new GpxImageCorrelationSettings(0, false, TimeSource.EXIFCAMTIME, pDirectionPosition.getSettings())); |
| 86 | 87 | yLayer.updateBufferAndRepaint(); |
| 87 | 88 | } |
| 88 | 89 | } |
diff --git a/src/org/openstreetmap/josm/gui/layer/geoimage/ImageMetadata.java b/src/org/openstreetmap/josm/gui/layer/geoimage/ImageMetadata.java
index 7aebccd962..1c01723c6c 100644
|
a
|
b
|
import java.time.Instant;
|
| 11 | 11 | import java.util.List; |
| 12 | 12 | |
| 13 | 13 | import org.openstreetmap.josm.data.coor.ILatLon; |
| | 14 | import org.openstreetmap.josm.data.gpx.TimeSource; |
| 14 | 15 | import org.openstreetmap.josm.data.imagery.street_level.Projections; |
| 15 | 16 | |
| 16 | 17 | /** |
| … |
… |
public interface ImageMetadata {
|
| 115 | 116 | */ |
| 116 | 117 | boolean hasExifGpsTime(); |
| 117 | 118 | |
| | 119 | /** |
| | 120 | * Return the time value selected with the parameter. |
| | 121 | * @param timeSource the wanted time value, exifCamTime or exifGpsTime |
| | 122 | * @return exifInstant or exifGpsInstant value |
| | 123 | * @since xxx |
| | 124 | */ |
| | 125 | Instant getThisInstant(TimeSource timeSource); |
| | 126 | |
| 118 | 127 | /** |
| 119 | 128 | * Get the EXIF coordinates |
| 120 | 129 | * @return The location of the image |
diff --git a/src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java b/src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java
index 344c8b5e11..a3ecf8ffc4 100644
|
a
|
b
|
import java.util.Objects;
|
| 17 | 17 | import java.util.function.Supplier; |
| 18 | 18 | |
| 19 | 19 | import org.openstreetmap.josm.data.coor.ILatLon; |
| | 20 | import org.openstreetmap.josm.data.gpx.TimeSource; |
| 20 | 21 | import org.openstreetmap.josm.data.imagery.street_level.IImageEntry; |
| 21 | 22 | import org.openstreetmap.josm.data.imagery.street_level.Projections; |
| 22 | 23 | import org.openstreetmap.josm.tools.HttpClient; |
| … |
… |
public class RemoteEntry implements IImageEntry<RemoteEntry>, ImageMetadata {
|
| 360 | 361 | return this.exifTime != null; |
| 361 | 362 | } |
| 362 | 363 | |
| | 364 | @Override |
| | 365 | public Instant getThisInstant(TimeSource timeSource) { |
| | 366 | return this.getThisInstant(timeSource); |
| | 367 | } |
| | 368 | |
| 363 | 369 | @Override |
| 364 | 370 | public Instant getExifGpsInstant() { |
| 365 | 371 | return this.exifGpsTime; |