Interface ImageMetadata
-
- All Known Implementing Classes:
GpxImageEntry,ImageEntry,ImageMarker.MarkerRemoteEntry,RemoteEntry,WikimediaCommonsEntry
public interface ImageMetadata
An interface for images with metadata- Since:
- 18592, largely extracted from
GpxImageEntry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidextractExif()Extract GPS metadata from image EXIF.java.lang.StringgetDisplayName()Returns a display name for this entryjava.lang.DoublegetElevation()Returns the elevation value.ILatLongetExifCoor()Get the EXIF coordinatesjava.lang.StringgetExifGpsDatum()Get the GPS datum value.java.lang.DoublegetExifGpsDop()Get the EXIF GPS DOP value.java.time.InstantgetExifGpsInstant()Returns the EXIF GPS time.java.lang.StringgetExifGpsProcMethod()Get the EXIF GPS processing method.java.lang.DoublegetExifGpsTrack()Get the EXIF GPS track direction.java.lang.DoublegetExifHPosErr()Get the EXIF Horizontal positioning error.java.lang.DoublegetExifImgDir()Get the EXIF directionjava.time.InstantgetExifInstant()Returns EXIF timedefault java.lang.IntegergetExifOrientation()Returns EXIF orientationjava.lang.IntegergetGps2d3dMode()Get the GPS 2d/3d mode.java.lang.IntegergetGpsDiffMode()Get the GPS Differential mode.java.time.InstantgetGpsInstant()Returns the GPS time value.intgetHeight()Returns height of the image this ImageMetadata represents.java.net.URIgetImageURI()Get the image locationjava.io.InputStreamgetInputStream()Get the image input streamjava.lang.StringgetIptcCaption()Returns the IPTC caption.java.lang.StringgetIptcHeadline()Returns the IPTC headline.java.util.List<java.lang.String>getIptcKeywords()Returns the IPTC keywords.java.lang.StringgetIptcObjectName()Returns the IPTC object name.java.time.InstantgetLastModified()Get the last time the source was modified.ILatLongetPos()Returns the position value.ProjectionsgetProjectionType()Get the projection type for this entryjava.lang.DoublegetSpeed()Returns the speed value.java.time.InstantgetTimeSourceInstant(TimeSource timeSource)Return the time value selected with the parameter.intgetWidth()Returns width of the image this ImageMetadata represents.booleanhasExifGpsTime()Convenient way to determine if this entry has a EXIF GPS time, without the cost of building a defensive copy.booleanhasExifTime()Convenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy.booleanhasGpsTime()Convenient way to determine if this entry has a GPS time, without the cost of building a defensive copy.voidsetElevation(java.lang.Double elevation)Sets the elevation.voidsetExifCoor(ILatLon exifCoor)Sets the EXIF coordinatesvoidsetExifGpsDatum(java.lang.String exifGpsDatum)Sets the GPS datum value.voidsetExifGpsDop(java.lang.Double exifGpsDop)Sets the EXIF GPS DOP value.voidsetExifGpsProcMethod(java.lang.String exifGpsProcMethod)Sets the GPS processing method.voidsetExifGpsTime(java.time.Instant exifGpsTime)Sets the EXIF GPS time.voidsetExifGpsTrack(java.lang.Double exifGpsTrack)Sets the EXIF GPS track direction.voidsetExifHPosErr(java.lang.Double exifHPosErr)Sets the EXIF horizontal positioning error.voidsetExifImgDir(java.lang.Double exifDir)Sets the EXIF directionvoidsetExifOrientation(java.lang.Integer exifOrientation)Sets EXIF orientation.voidsetExifTime(java.time.Instant exifTime)Sets EXIF time.voidsetGps2d3dMode(java.lang.Integer gps2d3dMode)Sets the GPS 2d/3d mode.voidsetGpsDiffMode(java.lang.Integer gpsDiffMode)Sets the GPS Differential mode.voidsetGpsTime(java.time.Instant gpsTime)Sets the GPS time.voidsetHeight(int height)Sets the height of this ImageMetadata.voidsetIptcCaption(java.lang.String iptcCaption)Sets the IPTC caption.voidsetIptcHeadline(java.lang.String iptcHeadline)Sets the IPTC headline.voidsetIptcKeywords(java.util.List<java.lang.String> iptcKeywords)Sets the IPTC keywords.voidsetIptcObjectName(java.lang.String iptcObjectName)Sets the IPTC object name.voidsetPos(ILatLon pos)Sets the position.voidsetProjectionType(Projections newProjection)Set the new projection typevoidsetSpeed(java.lang.Double speed)Sets the speed.voidsetWidth(int width)Sets the width of this ImageMetadata.
-
-
-
Method Detail
-
getImageURI
java.net.URI getImageURI()
Get the image location- Returns:
- The image location
-
getWidth
int getWidth()
Returns width of the image this ImageMetadata represents.- Returns:
- width of the image this ImageMetadata represents
-
getHeight
int getHeight()
Returns height of the image this ImageMetadata represents.- Returns:
- height of the image this ImageMetadata represents
- Since:
- 18592 (interface), 13220 (GpxImageEntry)
-
getPos
ILatLon getPos()
Returns the position value. The position value from the temporary copy is returned if that copy exists.- Returns:
- the position value
-
getSpeed
java.lang.Double getSpeed()
Returns the speed value. The speed value from the temporary copy is returned if that copy exists.- Returns:
- the speed value
-
getElevation
java.lang.Double getElevation()
Returns the elevation value. The elevation value from the temporary copy is returned if that copy exists.- Returns:
- the elevation value
-
getGpsInstant
java.time.Instant getGpsInstant()
Returns the GPS time value. The GPS time value from the temporary copy is returned if that copy exists.- Returns:
- the GPS time value
-
hasGpsTime
boolean hasGpsTime()
Convenient way to determine if this entry has a GPS time, without the cost of building a defensive copy.- Returns:
trueif this entry has a GPS time- Since:
- 18592 (interface), 6450 (GpxImageEntry)
-
getDisplayName
java.lang.String getDisplayName()
Returns a display name for this entry- Returns:
- a display name for this entry
-
getExifOrientation
default java.lang.Integer getExifOrientation()
Returns EXIF orientation- Returns:
- EXIF orientation
-
getExifInstant
java.time.Instant getExifInstant()
Returns EXIF time- Returns:
- EXIF time
- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
hasExifTime
boolean hasExifTime()
Convenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy.- Returns:
trueif this entry has a EXIF time- Since:
- 18592 (interface), 6450 (GpxImageEntry)
-
getExifGpsInstant
java.time.Instant getExifGpsInstant()
Returns the EXIF GPS time.- Returns:
- the EXIF GPS time
- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
hasExifGpsTime
boolean hasExifGpsTime()
Convenient way to determine if this entry has a EXIF GPS time, without the cost of building a defensive copy.- Returns:
trueif this entry has a EXIF GPS time- Since:
- 18592 (interface), 6450 (GpxImageEntry)
-
getTimeSourceInstant
java.time.Instant getTimeSourceInstant(TimeSource timeSource)
Return the time value selected with the parameter.- Parameters:
timeSource- the wanted time value, exifCamTime or exifGpsTime- Returns:
- exifInstant or exifGpsInstant value
- Since:
- 19426
-
getExifCoor
ILatLon getExifCoor()
Get the EXIF coordinates- Returns:
- The location of the image
-
getExifImgDir
java.lang.Double getExifImgDir()
Get the EXIF direction- Returns:
- The image direction
-
getExifGpsTrack
java.lang.Double getExifGpsTrack()
Get the EXIF GPS track direction.- Returns:
- The GPS track direction
- Since:
- 19387
-
getExifHPosErr
java.lang.Double getExifHPosErr()
Get the EXIF Horizontal positioning error.- Returns:
- The image horizontal positioning error
- Since:
- 19387
-
getGpsDiffMode
java.lang.Integer getGpsDiffMode()
Get the GPS Differential mode.- Returns:
- The image gnss fix mode
- Since:
- 19387
-
getGps2d3dMode
java.lang.Integer getGps2d3dMode()
Get the GPS 2d/3d mode.- Returns:
- The image gnss 2d/3d mode
- Since:
- 19387
-
getExifGpsDop
java.lang.Double getExifGpsDop()
Get the EXIF GPS DOP value.- Returns:
- The image GPS DOP value
- Since:
- 19387
-
getExifGpsDatum
java.lang.String getExifGpsDatum()
Get the GPS datum value.- Returns:
- The image GPS datum value
- Since:
- 19387
-
getExifGpsProcMethod
java.lang.String getExifGpsProcMethod()
Get the EXIF GPS processing method.- Returns:
- The image GPS processing method
- Since:
- 19387
-
getLastModified
java.time.Instant getLastModified()
Get the last time the source was modified.- Returns:
- The last time the source was modified
-
setWidth
void setWidth(int width)
Sets the width of this ImageMetadata.- Parameters:
width- set the width of this ImageMetadata- Since:
- 18592 (interface), 13220 (GpxImageEntry)
-
setHeight
void setHeight(int height)
Sets the height of this ImageMetadata.- Parameters:
height- set the height of this ImageMetadata- Since:
- 18592 (interface), 13220 (GpxImageEntry)
-
setSpeed
void setSpeed(java.lang.Double speed)
Sets the speed.- Parameters:
speed- speed
-
setElevation
void setElevation(java.lang.Double elevation)
Sets the elevation.- Parameters:
elevation- elevation
-
setExifOrientation
void setExifOrientation(java.lang.Integer exifOrientation)
Sets EXIF orientation.- Parameters:
exifOrientation- EXIF orientation
-
setExifTime
void setExifTime(java.time.Instant exifTime)
Sets EXIF time.- Parameters:
exifTime- EXIF time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setExifGpsTime
void setExifGpsTime(java.time.Instant exifGpsTime)
Sets the EXIF GPS time.- Parameters:
exifGpsTime- the EXIF GPS time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setGpsTime
void setGpsTime(java.time.Instant gpsTime)
Sets the GPS time.- Parameters:
gpsTime- the GPS time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setExifCoor
void setExifCoor(ILatLon exifCoor)
Sets the EXIF coordinates- Parameters:
exifCoor- The EXIF coordinates
-
setExifImgDir
void setExifImgDir(java.lang.Double exifDir)
Sets the EXIF direction- Parameters:
exifDir- The direction
-
setExifGpsTrack
void setExifGpsTrack(java.lang.Double exifGpsTrack)
Sets the EXIF GPS track direction.- Parameters:
exifGpsTrack- The GPS track direction- Since:
- 19387
-
setExifHPosErr
void setExifHPosErr(java.lang.Double exifHPosErr)
Sets the EXIF horizontal positioning error.- Parameters:
exifHPosErr- the EXIF horizontal positionning error- Since:
- 19387
-
setExifGpsDop
void setExifGpsDop(java.lang.Double exifGpsDop)
Sets the EXIF GPS DOP value.- Parameters:
exifGpsDop- the EXIF GPS DOP value- Since:
- 19387
-
setGpsDiffMode
void setGpsDiffMode(java.lang.Integer gpsDiffMode)
Sets the GPS Differential mode.- Parameters:
gpsDiffMode- GPS Differential mode- Since:
- 19387
-
setGps2d3dMode
void setGps2d3dMode(java.lang.Integer gps2d3dMode)
Sets the GPS 2d/3d mode.- Parameters:
gps2d3dMode- GPS 2d/3d mode- Since:
- 19387
-
setExifGpsDatum
void setExifGpsDatum(java.lang.String exifGpsDatum)
Sets the GPS datum value.- Parameters:
exifGpsDatum- GPS datum- Since:
- 19387
-
setExifGpsProcMethod
void setExifGpsProcMethod(java.lang.String exifGpsProcMethod)
Sets the GPS processing method.- Parameters:
exifGpsProcMethod- GPS processing method- Since:
- 19387
-
setIptcCaption
void setIptcCaption(java.lang.String iptcCaption)
Sets the IPTC caption.- Parameters:
iptcCaption- the IPTC caption- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcHeadline
void setIptcHeadline(java.lang.String iptcHeadline)
Sets the IPTC headline.- Parameters:
iptcHeadline- the IPTC headline- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcKeywords
void setIptcKeywords(java.util.List<java.lang.String> iptcKeywords)
Sets the IPTC keywords.- Parameters:
iptcKeywords- the IPTC keywords- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcObjectName
void setIptcObjectName(java.lang.String iptcObjectName)
Sets the IPTC object name.- Parameters:
iptcObjectName- the IPTC object name- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcCaption
java.lang.String getIptcCaption()
Returns the IPTC caption.- Returns:
- the IPTC caption
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcHeadline
java.lang.String getIptcHeadline()
Returns the IPTC headline.- Returns:
- the IPTC headline
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcKeywords
java.util.List<java.lang.String> getIptcKeywords()
Returns the IPTC keywords.- Returns:
- the IPTC keywords
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcObjectName
java.lang.String getIptcObjectName()
Returns the IPTC object name.- Returns:
- the IPTC object name
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
extractExif
default void extractExif()
Extract GPS metadata from image EXIF. Has no effect if the image file is not setIf successful, fills in the LatLon, speed, elevation, image direction, and other attributes
- Since:
- 18592 (interface), 9270 (GpxImageEntry)
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOException
Get the image input stream- Returns:
- The input stream of the image
- Throws:
java.io.IOException- If something happens during image read. See implementation for details.
-
getProjectionType
Projections getProjectionType()
Get the projection type for this entry- Returns:
- The projection type
- Since:
- 18592 (interface), 18246 (GpxImageEntry)
-
setProjectionType
void setProjectionType(Projections newProjection)
Set the new projection type- Parameters:
newProjection- The new type
-
-