Package gov.nih.mipav.model.file
Class MetadataExtractor.GpsDirectory
- java.lang.Object
-
- gov.nih.mipav.model.file.MetadataExtractor.Directory
-
- gov.nih.mipav.model.file.MetadataExtractor.ExifDirectoryBase
-
- gov.nih.mipav.model.file.MetadataExtractor.GpsDirectory
-
- Enclosing class:
- MetadataExtractor
public class MetadataExtractor.GpsDirectory extends MetadataExtractor.ExifDirectoryBase
Describes Exif tags that contain Global Positioning System (GPS) data.- Author:
- Drew Noakes https://drewnoakes.com
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap<java.lang.Integer,java.lang.String>
_tagNameMap
static int
TAG_ALTITUDE
Altitude GPSAltitude 6 6 RATIONAL 1static int
TAG_ALTITUDE_REF
Altitude reference GPSAltitudeRef 5 5 BYTE 1static int
TAG_AREA_INFORMATION
Name of the GPS area GPSAreaInformation 28 1C UNDEFINED Anystatic int
TAG_DATE_STAMP
Date and time GPSDateStamp 29 1D ASCII 11static int
TAG_DEST_BEARING
Bearing of destination GPSDestBearing 24 18 RATIONAL 1static int
TAG_DEST_BEARING_REF
Reference for bearing of destination GPSDestBearingRef 23 17 ASCII 2static int
TAG_DEST_DISTANCE
Distance to destination GPSDestDistance 26 1A RATIONAL 1static int
TAG_DEST_DISTANCE_REF
Reference for distance to destination GPSDestDistanceRef 25 19 ASCII 2static int
TAG_DEST_LATITUDE
Latitude of destination GPSDestLatitude 20 14 RATIONAL 3static int
TAG_DEST_LATITUDE_REF
Reference for latitude of destination GPSDestLatitudeRef 19 13 ASCII 2static int
TAG_DEST_LONGITUDE
Longitude of destination GPSDestLongitude 22 16 RATIONAL 3static int
TAG_DEST_LONGITUDE_REF
Reference for longitude of destination GPSDestLongitudeRef 21 15 ASCII 2static int
TAG_DIFFERENTIAL
Whether differential correction is applied GPSDifferential 30 1E SHORT 1static int
TAG_DOP
Measurement precision GPSDOP 11 B RATIONAL 1static int
TAG_H_POSITIONING_ERROR
Horizontal positioning errors GPSHPositioningError 31 1F RATIONAL 1static int
TAG_IMG_DIRECTION
Direction of image GPSImgDirection 17 11 RATIONAL 1static int
TAG_IMG_DIRECTION_REF
Reference for direction of image GPSImgDirectionRef 16 10 ASCII 2static int
TAG_LATITUDE
Latitude GPSLatitude 2 2 RATIONAL 3static int
TAG_LATITUDE_REF
North or South Latitude GPSLatitudeRef 1 1 ASCII 2static int
TAG_LONGITUDE
Longitude GPSLongitude 4 4 RATIONAL 3static int
TAG_LONGITUDE_REF
East or West Longitude GPSLongitudeRef 3 3 ASCII 2static int
TAG_MAP_DATUM
Geodetic survey data used GPSMapDatum 18 12 ASCII Anystatic int
TAG_MEASURE_MODE
GPS measurement mode GPSMeasureMode 10 A ASCII 2static int
TAG_PROCESSING_METHOD
Name of the method used for location finding GPSProcessingMethod 27 1B UNDEFINED Anystatic int
TAG_SATELLITES
GPS satellites used for measurement GPSSatellites 8 8 ASCII Anystatic int
TAG_SPEED
Speed of GPS receiver GPSSpeed 13 D RATIONAL 1static int
TAG_SPEED_REF
Speed unit GPSSpeedRef 12 C ASCII 2static int
TAG_STATUS
GPS receiver status GPSStatus 9 9 ASCII 2static int
TAG_TIME_STAMP
GPS time (atomic clock) GPSTimeStamp 7 7 RATIONAL 3static int
TAG_TRACK
Direction of movement GPSTrack 15 F RATIONAL 1static int
TAG_TRACK_REF
Reference for direction of movement GPSTrackRef 14 E ASCII 2static int
TAG_VERSION_ID
GPS tag version GPSVersionID 0 0 BYTE 4-
Fields inherited from class gov.nih.mipav.model.file.MetadataExtractor.ExifDirectoryBase
TAG_35MM_FILM_EQUIV_FOCAL_LENGTH, TAG_ACCELERATION, TAG_APERTURE, TAG_APPLICATION_NOTES, TAG_ARTIST, TAG_BATTERY_LEVEL, TAG_BITS_PER_SAMPLE, TAG_BODY_SERIAL_NUMBER, TAG_BRIGHTNESS_VALUE, TAG_CAMERA_ELEVATION_ANGLE, TAG_CAMERA_OWNER_NAME, TAG_CFA_PATTERN, TAG_CFA_PATTERN_2, TAG_CFA_REPEAT_PATTERN_DIM, TAG_COLOR_SPACE, TAG_COMPONENTS_CONFIGURATION, TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL, TAG_COMPRESSION, TAG_CONTRAST, TAG_COPYRIGHT, TAG_CUSTOM_RENDERED, TAG_DATETIME, TAG_DATETIME_DIGITIZED, TAG_DATETIME_ORIGINAL, TAG_DEVICE_SETTING_DESCRIPTION, TAG_DIGITAL_ZOOM_RATIO, TAG_DOCUMENT_NAME, TAG_EXIF_IMAGE_HEIGHT, TAG_EXIF_IMAGE_WIDTH, TAG_EXIF_VERSION, TAG_EXPOSURE_BIAS, TAG_EXPOSURE_INDEX, TAG_EXPOSURE_INDEX_TIFF_EP, TAG_EXPOSURE_MODE, TAG_EXPOSURE_PROGRAM, TAG_EXPOSURE_TIME, TAG_EXTRA_SAMPLES, TAG_FILE_SOURCE, TAG_FILL_ORDER, TAG_FLASH, TAG_FLASH_ENERGY, TAG_FLASH_ENERGY_TIFF_EP, TAG_FLASHPIX_VERSION, TAG_FNUMBER, TAG_FOCAL_LENGTH, TAG_FOCAL_PLANE_RESOLUTION_UNIT, TAG_FOCAL_PLANE_X_RESOLUTION, TAG_FOCAL_PLANE_X_RESOLUTION_TIFF_EP, TAG_FOCAL_PLANE_Y_RESOLUTION, TAG_FOCAL_PLANE_Y_RESOLUTION_TIFF_EP, TAG_GAIN_CONTROL, TAG_GAMMA, TAG_HOST_COMPUTER, TAG_HUMIDITY, TAG_IMAGE_DESCRIPTION, TAG_IMAGE_HEIGHT, TAG_IMAGE_HISTORY, TAG_IMAGE_NUMBER, TAG_IMAGE_UNIQUE_ID, TAG_IMAGE_WIDTH, TAG_INTER_COLOR_PROFILE, TAG_INTERLACE, TAG_INTEROP_INDEX, TAG_INTEROP_VERSION, TAG_IPTC_NAA, TAG_ISO_EQUIVALENT, TAG_ISO_SPEED, TAG_ISO_SPEED_LATITUDE_YYY, TAG_ISO_SPEED_LATITUDE_ZZZ, TAG_JPEG_AC_TABLES, TAG_JPEG_DC_TABLES, TAG_JPEG_LOSSLESS_PREDICTORS, TAG_JPEG_POINT_TRANSFORMS, TAG_JPEG_PROC, TAG_JPEG_Q_TABLES, TAG_JPEG_RESTART_INTERVAL, TAG_JPEG_TABLES, TAG_LENS, TAG_LENS_MAKE, TAG_LENS_MODEL, TAG_LENS_SERIAL_NUMBER, TAG_LENS_SPECIFICATION, TAG_LIGHT_SOURCE, TAG_MAKE, TAG_MAKERNOTE, TAG_MAX_APERTURE, TAG_MAX_SAMPLE_VALUE, TAG_METERING_MODE, TAG_MIN_SAMPLE_VALUE, TAG_MODEL, TAG_NEW_SUBFILE_TYPE, TAG_NOISE, TAG_OPTO_ELECTRIC_CONVERSION_FUNCTION, TAG_ORIENTATION, TAG_PADDING, TAG_PAGE_NAME, TAG_PAGE_NUMBER, TAG_PANASONIC_TITLE, TAG_PANASONIC_TITLE_2, TAG_PHOTOMETRIC_INTERPRETATION, TAG_PHOTOSHOP_SETTINGS, TAG_PLANAR_CONFIGURATION, TAG_PREDICTOR, TAG_PRESSURE, TAG_PRIMARY_CHROMATICITIES, TAG_PRINT_IMAGE_MATCHING_INFO, TAG_RATING, TAG_RATING_PERCENT, TAG_RECOMMENDED_EXPOSURE_INDEX, TAG_REFERENCE_BLACK_WHITE, TAG_RELATED_IMAGE_FILE_FORMAT, TAG_RELATED_IMAGE_HEIGHT, TAG_RELATED_IMAGE_WIDTH, TAG_RELATED_SOUND_FILE, TAG_RESOLUTION_UNIT, TAG_ROWS_PER_STRIP, TAG_SAMPLE_FORMAT, TAG_SAMPLES_PER_PIXEL, TAG_SATURATION, TAG_SCENE_CAPTURE_TYPE, TAG_SCENE_TYPE, TAG_SECURITY_CLASSIFICATION, TAG_SELF_TIMER_MODE_TIFF_EP, TAG_SENSING_METHOD, TAG_SENSITIVITY_TYPE, TAG_SHARPNESS, TAG_SHUTTER_SPEED, TAG_SOFTWARE, TAG_SPATIAL_FREQ_RESPONSE, TAG_SPATIAL_FREQ_RESPONSE_TIFF_EP, TAG_SPECTRAL_SENSITIVITY, TAG_STANDARD_ID_TIFF_EP, TAG_STANDARD_OUTPUT_SENSITIVITY, TAG_STRIP_BYTE_COUNTS, TAG_STRIP_OFFSETS, TAG_STRIP_ROW_COUNTS, TAG_SUB_IFD_OFFSET, TAG_SUBFILE_TYPE, TAG_SUBJECT_DISTANCE, TAG_SUBJECT_DISTANCE_RANGE, TAG_SUBJECT_LOCATION, TAG_SUBJECT_LOCATION_TIFF_EP, TAG_SUBSECOND_TIME, TAG_SUBSECOND_TIME_DIGITIZED, TAG_SUBSECOND_TIME_ORIGINAL, TAG_TEMPERATURE, TAG_THRESHOLDING, TAG_TILE_BYTE_COUNTS, TAG_TILE_LENGTH, TAG_TILE_OFFSETS, TAG_TILE_WIDTH, TAG_TIME_ZONE, TAG_TIME_ZONE_DIGITIZED, TAG_TIME_ZONE_OFFSET_TIFF_EP, TAG_TIME_ZONE_ORIGINAL, TAG_TRANSFER_FUNCTION, TAG_TRANSFER_RANGE, TAG_USER_COMMENT, TAG_WATER_DEPTH, TAG_WHITE_BALANCE, TAG_WHITE_BALANCE_MODE, TAG_WHITE_POINT, TAG_WIN_AUTHOR, TAG_WIN_COMMENT, TAG_WIN_KEYWORDS, TAG_WIN_SUBJECT, TAG_WIN_TITLE, TAG_X_RESOLUTION, TAG_Y_RESOLUTION, TAG_YCBCR_COEFFICIENTS, TAG_YCBCR_POSITIONING, TAG_YCBCR_SUBSAMPLING
-
Fields inherited from class gov.nih.mipav.model.file.MetadataExtractor.Directory
_definedTagList, _descriptor, _tagMap
-
-
Constructor Summary
Constructors Constructor Description GpsDirectory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadataExtractor.GeoLocation
getGeoLocation()
Parses various tags in an attempt to obtain a single object representing the latitude and longitude at which this image was captured.java.util.Date
getGpsDate()
Parses the date stamp tag and the time stamp tag to obtain a single Date object representing the date and time when this image was captured.java.lang.String
getName()
Provides the name of the directory, for display purposes.protected java.util.HashMap<java.lang.Integer,java.lang.String>
getTagNameMap()
Provides the map of tag names, hashed by tag type identifier.-
Methods inherited from class gov.nih.mipav.model.file.MetadataExtractor.ExifDirectoryBase
addExifTagNames
-
Methods inherited from class gov.nih.mipav.model.file.MetadataExtractor.Directory
addError, containsTag, getBoolean, getBooleanObject, getByteArray, getDate, getDate, getDate, getDescription, getDouble, getDoubleObject, getErrorCount, getErrors, getFloat, getFloatObject, getInt, getIntArray, getInteger, getLong, getLongObject, getObject, getParent, getRational, getRationalArray, getString, getString, getStringArray, getStringValue, getStringValueArray, getTagCount, getTagName, getTags, hasErrors, hasTagName, isEmpty, setBoolean, setByteArray, setDate, setDescriptor, setDouble, setDoubleArray, setFloat, setFloatArray, setInt, setIntArray, setLong, setObject, setObjectArray, setParent, setRational, setRationalArray, setString, setStringArray, setStringValue, setStringValueArray, toString
-
-
-
-
Field Detail
-
TAG_VERSION_ID
public static final int TAG_VERSION_ID
GPS tag version GPSVersionID 0 0 BYTE 4- See Also:
- Constant Field Values
-
TAG_LATITUDE_REF
public static final int TAG_LATITUDE_REF
North or South Latitude GPSLatitudeRef 1 1 ASCII 2- See Also:
- Constant Field Values
-
TAG_LATITUDE
public static final int TAG_LATITUDE
Latitude GPSLatitude 2 2 RATIONAL 3- See Also:
- Constant Field Values
-
TAG_LONGITUDE_REF
public static final int TAG_LONGITUDE_REF
East or West Longitude GPSLongitudeRef 3 3 ASCII 2- See Also:
- Constant Field Values
-
TAG_LONGITUDE
public static final int TAG_LONGITUDE
Longitude GPSLongitude 4 4 RATIONAL 3- See Also:
- Constant Field Values
-
TAG_ALTITUDE_REF
public static final int TAG_ALTITUDE_REF
Altitude reference GPSAltitudeRef 5 5 BYTE 1- See Also:
- Constant Field Values
-
TAG_ALTITUDE
public static final int TAG_ALTITUDE
Altitude GPSAltitude 6 6 RATIONAL 1- See Also:
- Constant Field Values
-
TAG_TIME_STAMP
public static final int TAG_TIME_STAMP
GPS time (atomic clock) GPSTimeStamp 7 7 RATIONAL 3- See Also:
- Constant Field Values
-
TAG_SATELLITES
public static final int TAG_SATELLITES
GPS satellites used for measurement GPSSatellites 8 8 ASCII Any- See Also:
- Constant Field Values
-
TAG_STATUS
public static final int TAG_STATUS
GPS receiver status GPSStatus 9 9 ASCII 2- See Also:
- Constant Field Values
-
TAG_MEASURE_MODE
public static final int TAG_MEASURE_MODE
GPS measurement mode GPSMeasureMode 10 A ASCII 2- See Also:
- Constant Field Values
-
TAG_DOP
public static final int TAG_DOP
Measurement precision GPSDOP 11 B RATIONAL 1- See Also:
- Constant Field Values
-
TAG_SPEED_REF
public static final int TAG_SPEED_REF
Speed unit GPSSpeedRef 12 C ASCII 2- See Also:
- Constant Field Values
-
TAG_SPEED
public static final int TAG_SPEED
Speed of GPS receiver GPSSpeed 13 D RATIONAL 1- See Also:
- Constant Field Values
-
TAG_TRACK_REF
public static final int TAG_TRACK_REF
Reference for direction of movement GPSTrackRef 14 E ASCII 2- See Also:
- Constant Field Values
-
TAG_TRACK
public static final int TAG_TRACK
Direction of movement GPSTrack 15 F RATIONAL 1- See Also:
- Constant Field Values
-
TAG_IMG_DIRECTION_REF
public static final int TAG_IMG_DIRECTION_REF
Reference for direction of image GPSImgDirectionRef 16 10 ASCII 2- See Also:
- Constant Field Values
-
TAG_IMG_DIRECTION
public static final int TAG_IMG_DIRECTION
Direction of image GPSImgDirection 17 11 RATIONAL 1- See Also:
- Constant Field Values
-
TAG_MAP_DATUM
public static final int TAG_MAP_DATUM
Geodetic survey data used GPSMapDatum 18 12 ASCII Any- See Also:
- Constant Field Values
-
TAG_DEST_LATITUDE_REF
public static final int TAG_DEST_LATITUDE_REF
Reference for latitude of destination GPSDestLatitudeRef 19 13 ASCII 2- See Also:
- Constant Field Values
-
TAG_DEST_LATITUDE
public static final int TAG_DEST_LATITUDE
Latitude of destination GPSDestLatitude 20 14 RATIONAL 3- See Also:
- Constant Field Values
-
TAG_DEST_LONGITUDE_REF
public static final int TAG_DEST_LONGITUDE_REF
Reference for longitude of destination GPSDestLongitudeRef 21 15 ASCII 2- See Also:
- Constant Field Values
-
TAG_DEST_LONGITUDE
public static final int TAG_DEST_LONGITUDE
Longitude of destination GPSDestLongitude 22 16 RATIONAL 3- See Also:
- Constant Field Values
-
TAG_DEST_BEARING_REF
public static final int TAG_DEST_BEARING_REF
Reference for bearing of destination GPSDestBearingRef 23 17 ASCII 2- See Also:
- Constant Field Values
-
TAG_DEST_BEARING
public static final int TAG_DEST_BEARING
Bearing of destination GPSDestBearing 24 18 RATIONAL 1- See Also:
- Constant Field Values
-
TAG_DEST_DISTANCE_REF
public static final int TAG_DEST_DISTANCE_REF
Reference for distance to destination GPSDestDistanceRef 25 19 ASCII 2- See Also:
- Constant Field Values
-
TAG_DEST_DISTANCE
public static final int TAG_DEST_DISTANCE
Distance to destination GPSDestDistance 26 1A RATIONAL 1- See Also:
- Constant Field Values
-
TAG_PROCESSING_METHOD
public static final int TAG_PROCESSING_METHOD
Name of the method used for location finding GPSProcessingMethod 27 1B UNDEFINED Any- See Also:
- Constant Field Values
-
TAG_AREA_INFORMATION
public static final int TAG_AREA_INFORMATION
Name of the GPS area GPSAreaInformation 28 1C UNDEFINED Any- See Also:
- Constant Field Values
-
TAG_DATE_STAMP
public static final int TAG_DATE_STAMP
Date and time GPSDateStamp 29 1D ASCII 11- See Also:
- Constant Field Values
-
TAG_DIFFERENTIAL
public static final int TAG_DIFFERENTIAL
Whether differential correction is applied GPSDifferential 30 1E SHORT 1- See Also:
- Constant Field Values
-
TAG_H_POSITIONING_ERROR
public static final int TAG_H_POSITIONING_ERROR
Horizontal positioning errors GPSHPositioningError 31 1F RATIONAL 1- See Also:
- Constant Field Values
-
_tagNameMap
private final java.util.HashMap<java.lang.Integer,java.lang.String> _tagNameMap
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:MetadataExtractor.Directory
Provides the name of the directory, for display purposes. E.g.Exif
- Specified by:
getName
in classMetadataExtractor.Directory
- Returns:
- the name of the directory
-
getTagNameMap
protected java.util.HashMap<java.lang.Integer,java.lang.String> getTagNameMap()
Description copied from class:MetadataExtractor.Directory
Provides the map of tag names, hashed by tag type identifier.- Specified by:
getTagNameMap
in classMetadataExtractor.Directory
- Returns:
- the map of tag names
-
getGeoLocation
public MetadataExtractor.GeoLocation getGeoLocation()
Parses various tags in an attempt to obtain a single object representing the latitude and longitude at which this image was captured.- Returns:
- The geographical location of this image, if possible, otherwise null
-
getGpsDate
public java.util.Date getGpsDate()
Parses the date stamp tag and the time stamp tag to obtain a single Date object representing the date and time when this image was captured.- Returns:
- A Date object representing when this image was captured, if possible, otherwise null
-
-