Package org.openstreetmap.josm.data.gpx
Class GpxImageEntry
- java.lang.Object
-
- org.openstreetmap.josm.data.gpx.GpxImageEntry
-
- All Implemented Interfaces:
java.lang.Comparable<GpxImageEntry>
,IQuadBucketType
,ImageMetadata
- Direct Known Subclasses:
ImageEntry
public class GpxImageEntry extends java.lang.Object implements java.lang.Comparable<GpxImageEntry>, IQuadBucketType, ImageMetadata
Stores info about each image- Since:
- 14205 (extracted from gui.layer.geoimage.ImageEntry)
-
-
Field Summary
Fields Modifier and Type Field Description private Projections
cameraProjection
private java.lang.Double
elevation
Elevation (altitude) in metersprivate LatLon
exifCoor
private java.lang.String
exifGpsDatum
GPS Datumprivate java.lang.Double
exifGpsDop
private java.lang.String
exifGpsProcMethod
GPS processing methodprivate java.time.Instant
exifGpsTime
Temporary source of GPS time if not correlated with GPX track.private java.lang.Double
exifGpsTrack
private java.lang.Double
exifHPosErr
private java.lang.Double
exifImgDir
private java.lang.Integer
exifOrientation
private java.time.Instant
exifTime
private java.io.File
file
private java.lang.Integer
gps2d3dMode
GPS Measure modeprivate java.lang.Integer
gpsDiffMode
GPS Differential modeprivate java.time.Instant
gpsTime
The time after correlation with a gpx trackprivate int
height
private java.lang.String
iptcCaption
private java.lang.String
iptcHeadline
private java.util.List<java.lang.String>
iptcKeywords
private java.lang.String
iptcObjectName
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 java.lang.Double
speed
Speed in kilometer per hourprivate GpxImageEntry
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.private int
width
-
Constructor Summary
Constructors Constructor Description GpxImageEntry()
Constructs a newGpxImageEntry
.GpxImageEntry(java.io.File file)
Constructs a newGpxImageEntry
.GpxImageEntry(GpxImageEntry other)
Constructs a newGpxImageEntry
from an existing instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyTmp()
Copy the values from the temporary variable to the main instance.WayPoint
asWayPoint()
Returns aWayPoint
representation of this GPX image entry.int
compareTo(GpxImageEntry image)
GpxImageEntry
createTmp()
Make a fresh copy and save it in the temporary variable.void
discardTmp()
Delete the temporary variable.boolean
equals(java.lang.Object obj)
void
extractExif()
Extract GPS metadata from image EXIF.void
flagNewGpsData()
Indicates that the image has new GPS data.BBox
getBBox()
Fetches the bounding box of the primitive.private static java.util.Date
getDefensiveDate(java.time.Instant date)
java.lang.String
getDisplayName()
Returns a display name for this entryjava.lang.Double
getElevation()
Returns the elevation value.LatLon
getExifCoor()
Get the EXIF coordinatesjava.lang.String
getExifGpsDatum()
Return the EXIF GPS coordinates datum value.java.lang.Double
getExifGpsDop()
Return the GPS DOP value.java.time.Instant
getExifGpsInstant()
Returns the EXIF GPS time.java.lang.String
getExifGpsProcMethod()
Return the EXIF GPS processing method stringjava.lang.Double
getExifGpsTrack()
Convenient way to determine if this entry has a EXIF GPS track angle value, without the cost of building a defensive copy.java.lang.Double
getExifHPosErr()
Convenient way to determine if this entry has a EXIF GPS horizontal positionning error value, without the cost of building a defensive copy.java.lang.Double
getExifImgDir()
Get the EXIF directionjava.time.Instant
getExifInstant()
Returns EXIF timejava.lang.Integer
getExifOrientation()
Returns EXIF orientationjava.io.File
getFile()
Returns associated file.java.lang.Integer
getGps2d3dMode()
Return the GPS 2d or 3d mode value.java.lang.Integer
getGpsDiffMode()
Return the GPS Differential mode value.java.time.Instant
getGpsInstant()
Returns the GPS time value.int
getHeight()
Returns height of the image this GpxImageEntry represents.java.net.URI
getImageURI()
Get the image locationjava.io.InputStream
getInputStream()
Get the image input streamjava.lang.String
getIptcCaption()
Returns the IPTC caption.java.lang.String
getIptcHeadline()
Returns the IPTC headline.java.util.List<java.lang.String>
getIptcKeywords()
Returns the IPTC keywords.java.lang.String
getIptcObjectName()
Returns the IPTC object name.java.time.Instant
getLastModified()
Get the last time the source was modified.CachedLatLon
getPos()
Returns the position value.Projections
getProjectionType()
Get the projection type for this entryjava.lang.Double
getSpeed()
Returns the speed value.GpxImageEntry
getTmp()
Get temporary variable that is used for real time parameter adjustments.int
getWidth()
Returns width of the image this GpxImageEntry represents.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.int
hashCode()
boolean
hasNewGpsData()
Queries whether the GPS data changed.boolean
isTagged()
If it has been tagged i.e.java.awt.image.BufferedImage
read(java.awt.Dimension target)
Reads the image represented by this entry in the given target dimension.void
setElevation(java.lang.Double elevation)
Sets the elevation.void
setExifCoor(ILatLon exifCoor)
Sets the EXIF coordinatesvoid
setExifCoor(LatLon exifCoor)
Sets the EXIF coordinate.void
setExifGpsDatum(java.lang.String exifGpsDatum)
Sets the GPS Datum.void
setExifGpsDop(java.lang.Double exifGpsDop)
Sets GPS DOP value.void
setExifGpsProcMethod(java.lang.String exifGpsProcMethod)
Sets the GPS Processing Method.void
setExifGpsTime(java.time.Instant exifGpsTime)
Sets the EXIF GPS time.void
setExifGpsTrack(java.lang.Double exifGpsTrack)
Sets the EXIF GPS track (move direction angle)void
setExifHPosErr(java.lang.Double exifHPosErr)
Sets the EXIF horizontal positioning errorvoid
setExifImgDir(java.lang.Double exifDir)
Sets the EXIF directionvoid
setExifOrientation(java.lang.Integer exifOrientation)
Sets EXIF orientation.void
setExifTime(java.time.Instant exifTime)
Sets EXIF time.void
setFile(java.io.File file)
Sets associated file.void
setGps2d3dMode(java.lang.Integer gps2d3dMode)
Sets GPS 2d/3d mode.void
setGpsDiffMode(java.lang.Integer gpsDiffMode)
Sets GPS Differential mode.void
setGpsTime(java.time.Instant gpsTime)
Sets the GPS time.void
setHeight(int height)
Sets the height of this GpxImageEntry.void
setIptcCaption(java.lang.String iptcCaption)
Sets the IPTC caption.void
setIptcHeadline(java.lang.String iptcHeadline)
Sets the IPTC headline.void
setIptcKeywords(java.util.List<java.lang.String> iptcKeywords)
Sets the IPTC keywords.void
setIptcObjectName(java.lang.String iptcObjectName)
Sets the IPTC object name.void
setPos(CachedLatLon pos)
Sets the position.void
setPos(ILatLon pos)
Sets the position.void
setPos(LatLon pos)
Sets the position.void
setProjectionType(Projections newProjection)
Set the new projection typevoid
setSpeed(java.lang.Double speed)
Sets the speed.void
setWidth(int width)
Sets the width of this GpxImageEntry.protected void
tmpUpdated()
Indicate that the temporary copy has been updated.java.lang.String
toString()
String representation.void
unflagNewGpsData()
Remove the flag that indicates new GPS data.
-
-
-
Field Detail
-
file
private java.io.File file
-
exifOrientation
private java.lang.Integer exifOrientation
-
exifImgDir
private java.lang.Double exifImgDir
-
exifGpsTrack
private java.lang.Double exifGpsTrack
-
exifHPosErr
private java.lang.Double exifHPosErr
-
exifGpsDop
private java.lang.Double exifGpsDop
-
exifTime
private java.time.Instant exifTime
-
cameraProjection
private Projections cameraProjection
-
isNewGpsData
private boolean isNewGpsData
Flag isNewGpsData indicates that the GPS data of the image is new or has changed. GPS data includes the position, speed, elevation, time (e.g. as extracted from the GPS track). The flag can used to decide for which image file the EXIF GPS data is (re-)written.
-
exifGpsTime
private java.time.Instant exifGpsTime
Temporary source of GPS time if not correlated with GPX track.
-
iptcCaption
private java.lang.String iptcCaption
-
iptcHeadline
private java.lang.String iptcHeadline
-
iptcKeywords
private java.util.List<java.lang.String> iptcKeywords
-
iptcObjectName
private java.lang.String iptcObjectName
-
pos
private CachedLatLon pos
The following values are computed from the correlation with the gpx track or extracted from the image EXIF data.
-
speed
private java.lang.Double speed
Speed in kilometer per hour
-
elevation
private java.lang.Double elevation
Elevation (altitude) in meters
-
gpsDiffMode
private java.lang.Integer gpsDiffMode
GPS Differential mode
-
gps2d3dMode
private java.lang.Integer gps2d3dMode
GPS Measure mode
-
exifGpsDatum
private java.lang.String exifGpsDatum
GPS Datum
-
exifGpsProcMethod
private java.lang.String exifGpsProcMethod
GPS processing method
-
gpsTime
private java.time.Instant gpsTime
The time after correlation with a gpx track
-
width
private int width
-
height
private int height
-
tmp
private GpxImageEntry 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. On the other hand, when the user aborts this operation, the old values should be restored. We have a temporary copy, that overrides the normal values if it is not null. (This may be not the most elegant solution for this, but it works.)
-
-
Constructor Detail
-
GpxImageEntry
public GpxImageEntry()
Constructs a newGpxImageEntry
.
-
GpxImageEntry
public GpxImageEntry(GpxImageEntry other)
Constructs a newGpxImageEntry
from an existing instance.- Parameters:
other
- existing instance- Since:
- 14624
-
GpxImageEntry
public GpxImageEntry(java.io.File file)
Constructs a newGpxImageEntry
.- Parameters:
file
- Path to image file on disk
-
-
Method Detail
-
getImageURI
public java.net.URI getImageURI()
Description copied from interface:ImageMetadata
Get the image location- Specified by:
getImageURI
in interfaceImageMetadata
- Returns:
- The image location
-
getWidth
public int getWidth()
Returns width of the image this GpxImageEntry represents.- Specified by:
getWidth
in interfaceImageMetadata
- Returns:
- width of the image this GpxImageEntry represents
- Since:
- 13220
-
getHeight
public int getHeight()
Returns height of the image this GpxImageEntry represents.- Specified by:
getHeight
in interfaceImageMetadata
- Returns:
- height of the image this GpxImageEntry represents
- Since:
- 13220
-
getPos
public CachedLatLon getPos()
Returns the position value. The position value from the temporary copy is returned if that copy exists.- Specified by:
getPos
in interfaceImageMetadata
- Returns:
- the position value
-
getSpeed
public java.lang.Double getSpeed()
Returns the speed value. The speed value from the temporary copy is returned if that copy exists.- Specified by:
getSpeed
in interfaceImageMetadata
- Returns:
- the speed value
-
getElevation
public java.lang.Double getElevation()
Returns the elevation value. The elevation value from the temporary copy is returned if that copy exists.- Specified by:
getElevation
in interfaceImageMetadata
- Returns:
- the elevation value
-
getGpsDiffMode
public java.lang.Integer getGpsDiffMode()
Return the GPS Differential mode value. The GPS Differential mode value from the temporary copy is returned if that copy exists.- Specified by:
getGpsDiffMode
in interfaceImageMetadata
- Returns:
- the differential mode value
- Since:
- 19387
-
getGps2d3dMode
public java.lang.Integer getGps2d3dMode()
Return the GPS 2d or 3d mode value. The GPS mode value form the temporary copy is returned if that copy exists.- Specified by:
getGps2d3dMode
in interfaceImageMetadata
- Returns:
- the GPS 2d/3d mode value
- Since:
- 19387
-
getExifGpsDop
public java.lang.Double getExifGpsDop()
Return the GPS DOP value. The GPS DOP value from the temporary copy is returned if that copy exists.- Specified by:
getExifGpsDop
in interfaceImageMetadata
- Returns:
- the DOP value
- Since:
- 19387
-
getExifGpsDatum
public java.lang.String getExifGpsDatum()
Return the EXIF GPS coordinates datum value.- Specified by:
getExifGpsDatum
in interfaceImageMetadata
- Returns:
- The datum value
- Since:
- 19387
-
getExifGpsProcMethod
public java.lang.String getExifGpsProcMethod()
Return the EXIF GPS processing method string- Specified by:
getExifGpsProcMethod
in interfaceImageMetadata
- Returns:
- the processing method string
- Since:
- 19387
-
getGpsInstant
public java.time.Instant getGpsInstant()
Returns the GPS time value. The GPS time value from the temporary copy is returned if that copy exists.- Specified by:
getGpsInstant
in interfaceImageMetadata
- Returns:
- the GPS time value
-
hasGpsTime
public boolean hasGpsTime()
Convenient way to determine if this entry has a GPS time, without the cost of building a defensive copy.- Specified by:
hasGpsTime
in interfaceImageMetadata
- Returns:
true
if this entry has a GPS time- Since:
- 6450
-
getFile
public java.io.File getFile()
Returns associated file.- Returns:
- associated file
-
getDisplayName
public java.lang.String getDisplayName()
Returns a display name for this entry- Specified by:
getDisplayName
in interfaceImageMetadata
- Returns:
- a display name for this entry
-
getExifOrientation
public java.lang.Integer getExifOrientation()
Returns EXIF orientation- Specified by:
getExifOrientation
in interfaceImageMetadata
- Returns:
- EXIF orientation
-
getExifInstant
public java.time.Instant getExifInstant()
Returns EXIF time- Specified by:
getExifInstant
in interfaceImageMetadata
- Returns:
- EXIF time
- Since:
- 17715
-
hasExifTime
public boolean hasExifTime()
Convenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy.- Specified by:
hasExifTime
in interfaceImageMetadata
- Returns:
true
if this entry has a EXIF time- Since:
- 6450
-
getExifGpsInstant
public java.time.Instant getExifGpsInstant()
Returns the EXIF GPS time.- Specified by:
getExifGpsInstant
in interfaceImageMetadata
- Returns:
- the EXIF GPS time
- Since:
- 17715
-
hasExifGpsTime
public boolean hasExifGpsTime()
Convenient way to determine if this entry has a EXIF GPS time, without the cost of building a defensive copy.- Specified by:
hasExifGpsTime
in interfaceImageMetadata
- Returns:
true
if this entry has a EXIF GPS time- Since:
- 6450
-
getDefensiveDate
private static java.util.Date getDefensiveDate(java.time.Instant date)
-
getExifCoor
public LatLon getExifCoor()
Description copied from interface:ImageMetadata
Get the EXIF coordinates- Specified by:
getExifCoor
in interfaceImageMetadata
- Returns:
- The location of the image
-
getExifImgDir
public java.lang.Double getExifImgDir()
Description copied from interface:ImageMetadata
Get the EXIF direction- Specified by:
getExifImgDir
in interfaceImageMetadata
- Returns:
- The image direction
-
getExifGpsTrack
public java.lang.Double getExifGpsTrack()
Convenient way to determine if this entry has a EXIF GPS track angle value, without the cost of building a defensive copy.- Specified by:
getExifGpsTrack
in interfaceImageMetadata
- Returns:
true
if this entry has a EXIF track angle value- Since:
- 19387
-
getExifHPosErr
public java.lang.Double getExifHPosErr()
Convenient way to determine if this entry has a EXIF GPS horizontal positionning error value, without the cost of building a defensive copy.- Specified by:
getExifHPosErr
in interfaceImageMetadata
- Returns:
true
if this entry has a EXIF GPS horizontal positionning error value- Since:
- 19387
-
getLastModified
public java.time.Instant getLastModified()
Description copied from interface:ImageMetadata
Get the last time the source was modified.- Specified by:
getLastModified
in interfaceImageMetadata
- Returns:
- The last time the source was modified
-
setWidth
public void setWidth(int width)
Sets the width of this GpxImageEntry.- Specified by:
setWidth
in interfaceImageMetadata
- Parameters:
width
- set the width of this GpxImageEntry- Since:
- 13220
-
setHeight
public void setHeight(int height)
Sets the height of this GpxImageEntry.- Specified by:
setHeight
in interfaceImageMetadata
- Parameters:
height
- set the height of this GpxImageEntry- Since:
- 13220
-
setPos
public void setPos(CachedLatLon pos)
Sets the position.- Parameters:
pos
- cached position
-
setPos
public void setPos(LatLon pos)
Sets the position.- Parameters:
pos
- position (will be cached)
-
setPos
public void setPos(ILatLon pos)
Description copied from interface:ImageMetadata
Sets the position.- Specified by:
setPos
in interfaceImageMetadata
- Parameters:
pos
- position (will be cached)
-
setSpeed
public void setSpeed(java.lang.Double speed)
Sets the speed.- Specified by:
setSpeed
in interfaceImageMetadata
- Parameters:
speed
- speed
-
setElevation
public void setElevation(java.lang.Double elevation)
Sets the elevation.- Specified by:
setElevation
in interfaceImageMetadata
- Parameters:
elevation
- elevation
-
setGpsDiffMode
public void setGpsDiffMode(java.lang.Integer gpsDiffMode)
Sets GPS Differential mode.- Specified by:
setGpsDiffMode
in interfaceImageMetadata
- Parameters:
gpsDiffMode
- GPS Differential mode- Since:
- 19387
-
setGps2d3dMode
public void setGps2d3dMode(java.lang.Integer gps2d3dMode)
Sets GPS 2d/3d mode.- Specified by:
setGps2d3dMode
in interfaceImageMetadata
- Parameters:
gps2d3dMode
- GPS 2d/3d mode value- Since:
- 19387
-
setExifGpsDop
public void setExifGpsDop(java.lang.Double exifGpsDop)
Sets GPS DOP value.- Specified by:
setExifGpsDop
in interfaceImageMetadata
- Parameters:
exifGpsDop
- GPS DOP value- Since:
- 19387
-
setExifGpsDatum
public void setExifGpsDatum(java.lang.String exifGpsDatum)
Sets the GPS Datum.- Specified by:
setExifGpsDatum
in interfaceImageMetadata
- Parameters:
exifGpsDatum
- GPS Datum- Since:
- 19387
-
setExifGpsProcMethod
public void setExifGpsProcMethod(java.lang.String exifGpsProcMethod)
Sets the GPS Processing Method.- Specified by:
setExifGpsProcMethod
in interfaceImageMetadata
- Parameters:
exifGpsProcMethod
- GPS Processing Method- Since:
- 19387
-
setFile
public void setFile(java.io.File file)
Sets associated file.- Parameters:
file
- associated file
-
setExifOrientation
public void setExifOrientation(java.lang.Integer exifOrientation)
Sets EXIF orientation.- Specified by:
setExifOrientation
in interfaceImageMetadata
- Parameters:
exifOrientation
- EXIF orientation
-
setExifTime
public void setExifTime(java.time.Instant exifTime)
Sets EXIF time.- Specified by:
setExifTime
in interfaceImageMetadata
- Parameters:
exifTime
- EXIF time- Since:
- 17715
-
setExifGpsTime
public void setExifGpsTime(java.time.Instant exifGpsTime)
Sets the EXIF GPS time.- Specified by:
setExifGpsTime
in interfaceImageMetadata
- Parameters:
exifGpsTime
- the EXIF GPS time- Since:
- 17715
-
setGpsTime
public void setGpsTime(java.time.Instant gpsTime)
Sets the GPS time.- Specified by:
setGpsTime
in interfaceImageMetadata
- Parameters:
gpsTime
- the GPS time- Since:
- 17715
-
setExifCoor
public void setExifCoor(LatLon exifCoor)
Sets the EXIF coordinate.- Parameters:
exifCoor
- the coordinate
-
setExifCoor
public void setExifCoor(ILatLon exifCoor)
Description copied from interface:ImageMetadata
Sets the EXIF coordinates- Specified by:
setExifCoor
in interfaceImageMetadata
- Parameters:
exifCoor
- The EXIF coordinates
-
setExifImgDir
public void setExifImgDir(java.lang.Double exifDir)
Description copied from interface:ImageMetadata
Sets the EXIF direction- Specified by:
setExifImgDir
in interfaceImageMetadata
- Parameters:
exifDir
- The direction
-
setExifGpsTrack
public void setExifGpsTrack(java.lang.Double exifGpsTrack)
Sets the EXIF GPS track (move direction angle)- Specified by:
setExifGpsTrack
in interfaceImageMetadata
- Parameters:
exifGpsTrack
- the EXIF GPS track angle- Since:
- 19387
-
setExifHPosErr
public void setExifHPosErr(java.lang.Double exifHPosErr)
Sets the EXIF horizontal positioning error- Specified by:
setExifHPosErr
in interfaceImageMetadata
- Parameters:
exifHPosErr
- the EXIF horizontal positionning error- Since:
- 19387
-
setIptcCaption
public void setIptcCaption(java.lang.String iptcCaption)
Sets the IPTC caption.- Specified by:
setIptcCaption
in interfaceImageMetadata
- Parameters:
iptcCaption
- the IPTC caption- Since:
- 15219
-
setIptcHeadline
public void setIptcHeadline(java.lang.String iptcHeadline)
Sets the IPTC headline.- Specified by:
setIptcHeadline
in interfaceImageMetadata
- Parameters:
iptcHeadline
- the IPTC headline- Since:
- 15219
-
setIptcKeywords
public void setIptcKeywords(java.util.List<java.lang.String> iptcKeywords)
Sets the IPTC keywords.- Specified by:
setIptcKeywords
in interfaceImageMetadata
- Parameters:
iptcKeywords
- the IPTC keywords- Since:
- 15219
-
setIptcObjectName
public void setIptcObjectName(java.lang.String iptcObjectName)
Sets the IPTC object name.- Specified by:
setIptcObjectName
in interfaceImageMetadata
- Parameters:
iptcObjectName
- the IPTC object name- Since:
- 15219
-
getIptcCaption
public java.lang.String getIptcCaption()
Returns the IPTC caption.- Specified by:
getIptcCaption
in interfaceImageMetadata
- Returns:
- the IPTC caption
- Since:
- 15219
-
getIptcHeadline
public java.lang.String getIptcHeadline()
Returns the IPTC headline.- Specified by:
getIptcHeadline
in interfaceImageMetadata
- Returns:
- the IPTC headline
- Since:
- 15219
-
getIptcKeywords
public java.util.List<java.lang.String> getIptcKeywords()
Returns the IPTC keywords.- Specified by:
getIptcKeywords
in interfaceImageMetadata
- Returns:
- the IPTC keywords
- Since:
- 15219
-
getIptcObjectName
public java.lang.String getIptcObjectName()
Returns the IPTC object name.- Specified by:
getIptcObjectName
in interfaceImageMetadata
- Returns:
- the IPTC object name
- Since:
- 15219
-
compareTo
public int compareTo(GpxImageEntry image)
- Specified by:
compareTo
in interfacejava.lang.Comparable<GpxImageEntry>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
createTmp
public GpxImageEntry createTmp()
Make a fresh copy and save it in the temporary variable. UseapplyTmp()
ordiscardTmp()
if the temporary variable is not needed anymore.- Returns:
- the fresh copy.
-
getTmp
public GpxImageEntry getTmp()
Get temporary variable that is used for real time parameter adjustments. The temporary variable is created if it does not exist yet. UseapplyTmp()
ordiscardTmp()
if the temporary variable is not needed anymore.- Returns:
- temporary variable
-
applyTmp
public void applyTmp()
Copy the values from the temporary variable to the main instance. The temporary variable is deleted.- Since:
- 19387 exifGpsTrack, exifHPosErr, gpsDiffMode, gps2d3dMode, exifGpsDop, exifGpsDatum, exifGpsProcMethod added
- See Also:
discardTmp()
-
discardTmp
public void discardTmp()
Delete the temporary variable. Temporary modifications are lost.- See Also:
applyTmp()
-
isTagged
public boolean isTagged()
If it has been tagged i.e. matched to a gpx track or retrieved lat/lon from exif- Returns:
true
if it has been tagged
-
toString
public java.lang.String toString()
String representation. (only partial info)- Overrides:
toString
in classjava.lang.Object
-
flagNewGpsData
public void flagNewGpsData()
Indicates that the image has new GPS data. That flag is set by new GPS data providers. It is used e.g. by the photo_geotagging plugin to decide for which image file the EXIF GPS data needs to be (re-)written.- Since:
- 6392
-
tmpUpdated
protected void tmpUpdated()
Indicate that the temporary copy has been updated. Mostly used to prevent UI issues. By default, this is a no-op. Override when needed in subclasses.- Since:
- 17579
-
getBBox
public BBox getBBox()
Description copied from interface:IQuadBucketType
Fetches the bounding box of the primitive.- Specified by:
getBBox
in interfaceIQuadBucketType
- Returns:
- Bounding box of the object
-
unflagNewGpsData
public void unflagNewGpsData()
Remove the flag that indicates new GPS data. The flag is cleared by a new GPS data consumer.
-
hasNewGpsData
public boolean hasNewGpsData()
Queries whether the GPS data changed. The flag value from the temporary copy is returned if that copy exists.- Returns:
true
if GPS data changed,false
otherwise- Since:
- 6392
-
extractExif
public void extractExif()
Extract GPS metadata from image EXIF. Has no effect if the image file is not set If successful, fills in the LatLon, speed, elevation, image direction, and other attributes- Specified by:
extractExif
in interfaceImageMetadata
- Since:
- 9270
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
Description copied from interface:ImageMetadata
Get the image input stream- Specified by:
getInputStream
in interfaceImageMetadata
- Returns:
- The input stream of the image
- Throws:
java.io.IOException
- If something happens during image read. See implementation for details.
-
read
public java.awt.image.BufferedImage read(java.awt.Dimension target) throws java.io.IOException
Reads the image represented by this entry in the given target dimension.- Parameters:
target
- the desired dimension used for subsampling ornull
- Returns:
- the read image, or
null
- Throws:
java.io.IOException
- if any I/O error occurs- Since:
- 18246
-
getProjectionType
public Projections getProjectionType()
Get the projection type for this entry- Specified by:
getProjectionType
in interfaceImageMetadata
- Returns:
- The projection type
- Since:
- 18246
-
setProjectionType
public void setProjectionType(Projections newProjection)
Description copied from interface:ImageMetadata
Set the new projection type- Specified by:
setProjectionType
in interfaceImageMetadata
- Parameters:
newProjection
- The new type
-
asWayPoint
public WayPoint asWayPoint()
Returns aWayPoint
representation of this GPX image entry.- Returns:
- a
WayPoint
representation of this GPX image entry (containing position, instant and elevation) - Since:
- 18065
-
-