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
Modifier and TypeMethodDescriptiondefault voidExtract GPS metadata from image EXIF.Returns a display name for this entryReturns the elevation value.Get the EXIF coordinatesGet the GPS datum value.Get the EXIF GPS DOP value.Returns the EXIF GPS time.Get the EXIF GPS processing method.Get the EXIF GPS track direction.Get the EXIF Horizontal positioning error.Get the EXIF directionReturns EXIF timedefault IntegerReturns EXIF orientationGet the GPS 2d/3d mode.Get the GPS Differential mode.Returns the GPS time value.intReturns height of the image this ImageMetadata represents.Get the image locationGet the image input streamReturns the IPTC caption.Returns the IPTC headline.Returns the IPTC keywords.Returns the IPTC object name.Get the last time the source was modified.getPos()Returns the position value.Get the projection type for this entrygetSpeed()Returns the speed value.getTimeSourceInstant(TimeSource timeSource) Return the time value selected with the parameter.intgetWidth()Returns width of the image this ImageMetadata represents.booleanConvenient way to determine if this entry has a EXIF GPS time, without the cost of building a defensive copy.booleanConvenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy.booleanConvenient way to determine if this entry has a GPS time, without the cost of building a defensive copy.voidsetElevation(Double elevation) Sets the elevation.voidsetExifCoor(ILatLon exifCoor) Sets the EXIF coordinatesvoidsetExifGpsDatum(String exifGpsDatum) Sets the GPS datum value.voidsetExifGpsDop(Double exifGpsDop) Sets the EXIF GPS DOP value.voidsetExifGpsProcMethod(String exifGpsProcMethod) Sets the GPS processing method.voidsetExifGpsTime(Instant exifGpsTime) Sets the EXIF GPS time.voidsetExifGpsTrack(Double exifGpsTrack) Sets the EXIF GPS track direction.voidsetExifHPosErr(Double exifHPosErr) Sets the EXIF horizontal positioning error.voidsetExifImgDir(Double exifDir) Sets the EXIF directionvoidsetExifOrientation(Integer exifOrientation) Sets EXIF orientation.voidsetExifTime(Instant exifTime) Sets EXIF time.voidsetGps2d3dMode(Integer gps2d3dMode) Sets the GPS 2d/3d mode.voidsetGpsDiffMode(Integer gpsDiffMode) Sets the GPS Differential mode.voidsetGpsTime(Instant gpsTime) Sets the GPS time.voidsetHeight(int height) Sets the height of this ImageMetadata.voidsetIptcCaption(String iptcCaption) Sets the IPTC caption.voidsetIptcHeadline(String iptcHeadline) Sets the IPTC headline.voidsetIptcKeywords(List<String> iptcKeywords) Sets the IPTC keywords.voidsetIptcObjectName(String iptcObjectName) Sets the IPTC object name.voidSets the position.voidsetProjectionType(Projections newProjection) Set the new projection typevoidSets the speed.voidsetWidth(int width) Sets the width of this ImageMetadata.
-
Method Details
-
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
Returns the position value. The position value from the temporary copy is returned if that copy exists.- Returns:
- the position value
-
getSpeed
Returns the speed value. The speed value from the temporary copy is returned if that copy exists.- Returns:
- the speed value
-
getElevation
Returns the elevation value. The elevation value from the temporary copy is returned if that copy exists.- Returns:
- the elevation value
-
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
Returns a display name for this entry- Returns:
- a display name for this entry
-
getExifOrientation
Returns EXIF orientation- Returns:
- EXIF orientation
-
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
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
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
Get the EXIF coordinates- Returns:
- The location of the image
-
getExifImgDir
Get the EXIF direction- Returns:
- The image direction
-
getExifGpsTrack
Get the EXIF GPS track direction.- Returns:
- The GPS track direction
- Since:
- 19387
-
getExifHPosErr
Get the EXIF Horizontal positioning error.- Returns:
- The image horizontal positioning error
- Since:
- 19387
-
getGpsDiffMode
Get the GPS Differential mode.- Returns:
- The image gnss fix mode
- Since:
- 19387
-
getGps2d3dMode
Get the GPS 2d/3d mode.- Returns:
- The image gnss 2d/3d mode
- Since:
- 19387
-
getExifGpsDop
Get the EXIF GPS DOP value.- Returns:
- The image GPS DOP value
- Since:
- 19387
-
getExifGpsDatum
Get the GPS datum value.- Returns:
- The image GPS datum value
- Since:
- 19387
-
getExifGpsProcMethod
Get the EXIF GPS processing method.- Returns:
- The image GPS processing method
- Since:
- 19387
-
getLastModified
Get the last time the source was modified.- Returns:
- The last time the source was modified
-
setWidth
Sets the width of this ImageMetadata.- Parameters:
width- set the width of this ImageMetadata- Since:
- 18592 (interface), 13220 (GpxImageEntry)
-
setHeight
Sets the height of this ImageMetadata.- Parameters:
height- set the height of this ImageMetadata- Since:
- 18592 (interface), 13220 (GpxImageEntry)
-
setPos
Sets the position.- Parameters:
pos- position (will be cached)
-
setSpeed
Sets the speed.- Parameters:
speed- speed
-
setElevation
Sets the elevation.- Parameters:
elevation- elevation
-
setExifOrientation
Sets EXIF orientation.- Parameters:
exifOrientation- EXIF orientation
-
setExifTime
Sets EXIF time.- Parameters:
exifTime- EXIF time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setExifGpsTime
Sets the EXIF GPS time.- Parameters:
exifGpsTime- the EXIF GPS time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setGpsTime
Sets the GPS time.- Parameters:
gpsTime- the GPS time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setExifCoor
Sets the EXIF coordinates- Parameters:
exifCoor- The EXIF coordinates
-
setExifImgDir
Sets the EXIF direction- Parameters:
exifDir- The direction
-
setExifGpsTrack
Sets the EXIF GPS track direction.- Parameters:
exifGpsTrack- The GPS track direction- Since:
- 19387
-
setExifHPosErr
Sets the EXIF horizontal positioning error.- Parameters:
exifHPosErr- the EXIF horizontal positionning error- Since:
- 19387
-
setExifGpsDop
Sets the EXIF GPS DOP value.- Parameters:
exifGpsDop- the EXIF GPS DOP value- Since:
- 19387
-
setGpsDiffMode
Sets the GPS Differential mode.- Parameters:
gpsDiffMode- GPS Differential mode- Since:
- 19387
-
setGps2d3dMode
Sets the GPS 2d/3d mode.- Parameters:
gps2d3dMode- GPS 2d/3d mode- Since:
- 19387
-
setExifGpsDatum
Sets the GPS datum value.- Parameters:
exifGpsDatum- GPS datum- Since:
- 19387
-
setExifGpsProcMethod
Sets the GPS processing method.- Parameters:
exifGpsProcMethod- GPS processing method- Since:
- 19387
-
setIptcCaption
Sets the IPTC caption.- Parameters:
iptcCaption- the IPTC caption- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcHeadline
Sets the IPTC headline.- Parameters:
iptcHeadline- the IPTC headline- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcKeywords
Sets the IPTC keywords.- Parameters:
iptcKeywords- the IPTC keywords- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcObjectName
Sets the IPTC object name.- Parameters:
iptcObjectName- the IPTC object name- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcCaption
Returns the IPTC caption.- Returns:
- the IPTC caption
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcHeadline
Returns the IPTC headline.- Returns:
- the IPTC headline
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcKeywords
Returns the IPTC keywords.- Returns:
- the IPTC keywords
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcObjectName
Returns the IPTC object name.- Returns:
- the IPTC object name
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
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
Get the image input stream- Returns:
- The input stream of the image
- Throws:
IOException- If something happens during image read. See implementation for details.
-
getProjectionType
Get the projection type for this entry- Returns:
- The projection type
- Since:
- 18592 (interface), 18246 (GpxImageEntry)
-
setProjectionType
Set the new projection type- Parameters:
newProjection- The new type
-