public final class ImageEntry extends Object implements Comparable<ImageEntry>, Cloneable
Modifier and Type | Field and Description |
---|---|
private Double |
elevation
Elevation (altitude) in meters
|
private LatLon |
exifCoor |
private Date |
exifGpsTime
Temporary source of GPS time if not correlated with GPX track.
|
private Double |
exifImgDir |
private Integer |
exifOrientation |
private Date |
exifTime |
private File |
file |
private Date |
gpsTime
The time after correlation with a gpx track
|
private boolean |
isNewGpsData
Flag isNewGpsData indicates that the GPS data of the image is new or has changed.
|
private CachedLatLon |
pos
The following values are computed from the correlation with the gpx track
or extracted from the image EXIF data.
|
private Double |
speed
Speed in kilometer per hour
|
private Image |
thumbnail |
(package private) ImageEntry |
tmp
When the correlation dialog is open, we like to show the image position
for the current time offset on the map in real time.
|
Constructor and Description |
---|
ImageEntry()
Constructs a new
ImageEntry . |
ImageEntry(File file)
Constructs a new
ImageEntry . |
Modifier and Type | Method and Description |
---|---|
void |
applyTmp()
Copy the values from the temporary variable to the main instance.
|
ImageEntry |
clone() |
int |
compareTo(ImageEntry image) |
void |
createTmp()
Make a fresh copy and save it in the temporary variable.
|
void |
discardTmp()
Delete the temporary variable.
|
void |
extractExif()
Extract GPS metadata from image EXIF.
|
void |
flagNewGpsData()
Indicates that the image has new GPS data.
|
private static Date |
getDefensiveDate(Date date) |
Double |
getElevation()
Returns the elevation value.
|
LatLon |
getExifCoor() |
Date |
getExifGpsTime()
Returns the EXIF GPS time.
|
Double |
getExifImgDir() |
Integer |
getExifOrientation()
Returns EXIF orientation
|
Date |
getExifTime()
Returns EXIF time
|
File |
getFile()
Returns associated file.
|
Date |
getGpsTime()
Returns the GPS time value.
|
CachedLatLon |
getPos()
Returns the position value.
|
Double |
getSpeed()
Returns the speed value.
|
Image |
getThumbnail()
Returns the thumbnail.
|
ImageEntry |
getTmp()
Get temporary variable that is used for real time parameter
adjustments.
|
boolean |
hasExifGpsTime()
Convenient way to determine if this entry has a EXIF GPS time, without the cost of building a defensive copy.
|
boolean |
hasExifTime()
Convenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy.
|
boolean |
hasGpsTime()
Convenient way to determine if this entry has a GPS time, without the cost of building a defensive copy.
|
boolean |
hasNewGpsData()
Queries whether the GPS data changed.
|
boolean |
hasThumbnail()
Determines whether a thumbnail is set
|
boolean |
isTagged()
If it has been tagged i.e.
|
void |
loadThumbnail()
Loads the thumbnail if it was not loaded yet.
|
void |
setElevation(Double elevation)
Sets the elevation.
|
void |
setExifCoor(LatLon exifCoor) |
void |
setExifGpsTime(Date exifGpsTime)
Sets the EXIF GPS time.
|
void |
setExifImgDir(Double exifDir) |
void |
setExifOrientation(Integer exifOrientation)
Sets EXIF orientation.
|
void |
setExifTime(Date exifTime)
Sets EXIF time.
|
void |
setFile(File file)
Sets associated file.
|
void |
setGpsTime(Date gpsTime) |
void |
setPos(CachedLatLon pos)
Sets the position.
|
void |
setPos(LatLon pos)
Sets the position.
|
void |
setSpeed(Double speed)
Sets the speed.
|
void |
setThumbnail(Image thumbnail)
Sets the thumbnail.
|
String |
toString()
String representation.
|
void |
unflagNewGpsData()
Remove the flag that indicates new GPS data.
|
private Integer exifOrientation
private Double exifImgDir
private boolean isNewGpsData
private Date exifGpsTime
private CachedLatLon pos
ImageEntry tmp
public ImageEntry()
ImageEntry
.public ImageEntry(File file)
ImageEntry
.file
- Path to image file on diskpublic CachedLatLon getPos()
public Double getSpeed()
public Double getElevation()
public Date getGpsTime()
public boolean hasGpsTime()
true
if this entry has a GPS timepublic Integer getExifOrientation()
public Date getExifTime()
public boolean hasExifTime()
true
if this entry has a EXIF timepublic Date getExifGpsTime()
public boolean hasExifGpsTime()
true
if this entry has a EXIF GPS timeprivate static Date getDefensiveDate(Date date)
public LatLon getExifCoor()
public Double getExifImgDir()
public boolean hasThumbnail()
true
if a thumbnail is setpublic Image getThumbnail()
public void setThumbnail(Image thumbnail)
thumbnail
- thumbnailpublic void loadThumbnail()
ThumbsLoader
public void setPos(CachedLatLon pos)
pos
- cached positionpublic void setPos(LatLon pos)
pos
- position (will be cached)public void setElevation(Double elevation)
elevation
- elevationpublic void setExifOrientation(Integer exifOrientation)
exifOrientation
- EXIF orientationpublic void setExifTime(Date exifTime)
exifTime
- EXIF timepublic void setExifGpsTime(Date exifGpsTime)
exifGpsTime
- the EXIF GPS timepublic void setGpsTime(Date gpsTime)
public void setExifCoor(LatLon exifCoor)
public void setExifImgDir(Double exifDir)
public ImageEntry clone()
public int compareTo(ImageEntry image)
compareTo
in interface Comparable<ImageEntry>
public void createTmp()
applyTmp()
or discardTmp()
if the temporary variable
is not needed anymore.public ImageEntry getTmp()
applyTmp()
or discardTmp()
if the temporary
variable is not needed anymore.public void applyTmp()
discardTmp()
public void discardTmp()
applyTmp()
public boolean isTagged()
true
if it has been taggedpublic void flagNewGpsData()
public void unflagNewGpsData()
public boolean hasNewGpsData()
true
if GPS data changed, false
otherwisepublic void extractExif()