org.openstreetmap.josm.gui.layer.geoimage
Class CorrelateGpxWithImages
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.gui.layer.geoimage.CorrelateGpxWithImages
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class CorrelateGpxWithImages
- extends javax.swing.AbstractAction
This class displays the window to select the GPX file and the offset (timezone + delta).
Then it correlates the images of the layer with that GPX file.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
loadedGpxData
private static java.util.List<GpxData> loadedGpxData
yLayer
GeoImageLayer yLayer
timezone
double timezone
delta
long delta
syncDialog
ExtendedDialog syncDialog
gpxLst
java.util.Vector<CorrelateGpxWithImages.GpxDataWrapper> gpxLst
outerPanel
javax.swing.JPanel outerPanel
cbGpx
JosmComboBox cbGpx
tfTimezone
javax.swing.JTextField tfTimezone
tfOffset
javax.swing.JTextField tfOffset
cbExifImg
javax.swing.JCheckBox cbExifImg
cbTaggedImg
javax.swing.JCheckBox cbTaggedImg
cbShowThumbs
javax.swing.JCheckBox cbShowThumbs
statusBarText
javax.swing.JLabel statusBarText
lastNumMatched
int lastNumMatched
statusBarUpdater
CorrelateGpxWithImages.StatusBarUpdater statusBarUpdater
statusBarUpdaterWithRepaint
CorrelateGpxWithImages.StatusBarUpdater statusBarUpdaterWithRepaint
repaintTheMap
CorrelateGpxWithImages.RepaintTheMapListener repaintTheMap
CorrelateGpxWithImages
public CorrelateGpxWithImages(GeoImageLayer layer)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent arg0)
getSortedImgList
private java.util.ArrayList<ImageEntry> getSortedImgList()
getSortedImgList
private java.util.ArrayList<ImageEntry> getSortedImgList(boolean exif,
boolean tagged)
- Returns a list of images that fulfill the given criteria.
Default setting is to return untagged images, but may be overwritten.
- Parameters:
boolean
- all -- returns all available imagesboolean
- noexif -- returns untagged images without EXIF-GPS coords
this parameter is irrelevant if all
is trueboolean
- exif -- also returns images with exif-gps infoboolean
- tagged -- also returns tagged images
- Returns:
- ArrayList matching images
selectedGPX
private CorrelateGpxWithImages.GpxDataWrapper selectedGPX(boolean complain)
matchGpxTrack
private int matchGpxTrack(java.util.ArrayList<ImageEntry> images,
GpxData selectedGpx,
long offset)
- Match a list of photos to a gpx track with a given offset.
All images need a exifTime attribute and the List must be sorted according to these times.
matchPoints
private int matchPoints(java.util.ArrayList<ImageEntry> images,
WayPoint prevWp,
long prevWpTime,
WayPoint curWp,
long curWpTime,
long offset)
getLastIndexOfListBefore
private int getLastIndexOfListBefore(java.util.ArrayList<ImageEntry> images,
long searchedTime)
formatTimezone
private java.lang.String formatTimezone(double timezone)
parseTimezone
private double parseTimezone(java.lang.String timezone)
throws java.text.ParseException
- Throws:
java.text.ParseException
parseOffset
private long parseOffset(java.lang.String offset)
throws java.text.ParseException
- Throws:
java.text.ParseException
JOSM