Incorrect value for Composite:GPSLongitudeRef

Started by houdah, December 22, 2016, 10:26:42 AM

Previous topic - Next topic

houdah

Hi!

I have a JPEG image where I have latitude and longitude values in XMP that conflict with values in EXIF. I created that for testing purposes.

I expect composite value to pick up latitude, longitude, latitudeRef and longitudeRef from EXIF and to ignore values from XMP. Composite values however seem to be a mix of EXIF and XMP. I get the longitude value form EXIF and longitudeRef derived from XMP:GPSLongitude.

On OS X 10.11.6, I get the following from exiftool 10.36:

> ~/Downloads/Image-ExifTool-10.36/exiftool -a -G -s IMG_3592.JPG | grep -i gps
[EXIF]          GPSVersionID                    : 2.3.0.0
[EXIF]          GPSLatitudeRef                  : North
[EXIF]          GPSLatitude                     : 25 deg 29' 3.09"
[EXIF]          GPSLongitudeRef                 : West
[EXIF]          GPSLongitude                    : 76 deg 41' 14.34"
[EXIF]          GPSAltitudeRef                  : Above Sea Level
[EXIF]          GPSAltitude                     : 5 m
[EXIF]          GPSSpeedRef                     : km/h
[EXIF]          GPSSpeed                        : 33
[EXIF]          GPSTrackRef                     : True North
[EXIF]          GPSTrack                        : 10
[EXIF]          GPSImgDirectionRef              : True North
[EXIF]          GPSImgDirection                 : 10
[EXIF]          GPSMapDatum                     : WGS-84
[XMP]           GPSLatitude                     : 2 deg 0' 0.00" N
[XMP]           GPSLongitude                    : 2 deg 0' 0.00" E
[Composite]     GPSAltitude                     : 5 m Above Sea Level
[Composite]     GPSLatitude                     : 25 deg 29' 3.09" N
[Composite]     GPSLatitudeRef                  : North
[Composite]     GPSLongitude                    : 76 deg 41' 14.34" W
[Composite]     GPSLongitudeRef                 : East
[Composite]     GPSPosition                     : 25 deg 29' 3.09" N, 76 deg 41' 14.34" W

GPSLongitudeRef in EXIF is West
GPSLongitude in Composite picks up the value from EXIF: 76 deg West
Yet GPSLongitudeRef in Composite comes up with East. I guess it picked that up from XMP:GPSLongitude.


BTW, what I was trying to do was to consolidate GPS tag values in EXIF. Not sure yet that is a good idea. I came up with this command to copy all GPS* values to their preferred tag group and to clear redundant information from XMP:

> exiftool "-gps*>gps:all" "-xmp:gps*=" IMG_3592.JPG

That's when I wondered what would happen if there was conflicting information between -GPS:GPS* and -XMP:GPS*. I expected exiftool to give precedence to -GPS:GPS*, but I had to try.

Pierre

houdah

I get the same result when excluding XMP tags from reading:

> ~/Downloads/Image-ExifTool-10.36/exiftool -a -G -s --XMP:* IMG_3592.JPG | grep -i gps

[EXIF]          GPSVersionID                    : 2.3.0.0
[EXIF]          GPSLatitudeRef                  : North
[EXIF]          GPSLatitude                     : 25 deg 29' 3.09"
[EXIF]          GPSLongitudeRef                 : West
[EXIF]          GPSLongitude                    : 76 deg 41' 14.34"
[EXIF]          GPSAltitudeRef                  : Above Sea Level
[EXIF]          GPSAltitude                     : 5 m
[EXIF]          GPSSpeedRef                     : km/h
[EXIF]          GPSSpeed                        : 33
[EXIF]          GPSTrackRef                     : True North
[EXIF]          GPSTrack                        : 10
[EXIF]          GPSImgDirectionRef              : True North
[EXIF]          GPSImgDirection                 : 10
[EXIF]          GPSMapDatum                     : WGS-84
[Composite]     GPSAltitude                     : 5 m Above Sea Level
[Composite]     GPSLatitude                     : 25 deg 29' 3.09" N
[Composite]     GPSLatitudeRef                  : North
[Composite]     GPSLongitude                    : 76 deg 41' 14.34" W
[Composite]     GPSLongitudeRef                 : East
[Composite]     GPSPosition                     : 25 deg 29' 3.09" N, 76 deg 41' 14.34" W


Pierre

Phil Harvey

Yes.

The Composite:GPSLatitude/LongitudeRef tags come from the XMP because their purpose is to allow conversion from XMP GPS to EXIF.

Conversely, the Composite:GPSLatitude/Longitude tags come from EXIF because they are used when converting from EXIF GPS to XMP.

These are used by the gps2xmp.args and xmp2gps.args files which you can find in the full ExifTool distribution.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).