Exiftool GEO tag writing compatible with Windows Explorer

Started by perot, December 09, 2014, 08:02:01 AM

Previous topic - Next topic

perot

This may be slightly off-topic, but I do not know any better place to discuss it.

I use exiftool to write GPS information into JPEGs, using "-GPSLatitudeRef=S -GPSLatitude=<some positive float number>", and correspondingly for Longitude and Altitude. Displaying the changed file with exiftool I can see everything written as intended, but looking at the tags with Windows Explorer, the "Ref" information (N/S, W/E, above/below) is not displayed and seems to be ignored, just the unsigned coordinates are shown. Are there any other tags to write into the file so that the References are also shown in Windows? I thought I could use fixed Refs, set to "N/E/above", and encode the direction by using signed floats. However it seems Exiftool strips the signs and only writes the magnitude, causing this approch to fail.

I have searched all the tag documentation in the Exiftool docs for pertinent tags, but could not see any. Any idea?

Cheers  Peter

StarGeek

I believe this is something that's lacking in Windows Explorer, not a problem with ExifTool.  A quick google gave little information, but seemed to indicate that Explorer didn't have the ability to show it properly.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

The XMP GPS positions contain the hemisphere information in the same tag as the coordinates. (While in EXIF these are stored in 2 different tags.)  I wonder if Windows would display XMP GPS tags properly.

- 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 ($).

StarGeek

The image I checked had the XMP-exif gps tags, as it was geotagged with GeoSetter.   But just to double check, I copied just the XMP-exif tags but not the Exif gps tags to a test image and it was the same.  It didn't have a negative number where it should have had one.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Oh well.  I suggest submitting a bug report to Microsoft.

- 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 ($).

perot

Is it possible that the Explorer expects signed coordinates, i.e. a negative number for GPSLatitude, or GPSlongitude, or GPSAltitude, to indicate the respective other hemisphere? Exiftool refuses to write negative numbers, so I cannot test my hypothesis. Does the EXIF specification require the numbers to be positive? If not, then Exiftool should not strip the minus sign.

Cheers  Peter

milchtaich

Windows (7 and above) does not expect signed GPS coordinates but reads the EXIF Latitude and Longitude Ref tags (N/S and E/W) and stores them as part of the file's shell metadata http://msdn.microsoft.com/en-us/library/bb760564%28v=vs.85%29.aspx. However, by default this information is not exposed in the Explorer Details pane. Try file properties (select the file, ALT-Enter). It's also possible to add the two Ref tags to the Details pane by changing the relevant registry key.

perot

Quote from: milchtaich on December 10, 2014, 06:23:46 AM
Try file properties (select the file, ALT-Enter).
... and then go to the "Details" tab. This is what I was referring to in the top posting.

I have asked a friend to send me a picture he took with an iPhone5 in Lima, Peru (southern / western hemisphere). The GPS tags look as expected with exiftool, and the Windows Explorer does not show the references here either. This tells me it must be an Explorer issue. Then I read Milchtaich's comment
Quote from: milchtaich on December 10, 2014, 06:23:46 AM
However, by default this information is not exposed in the Explorer Details pane. [] It's also possible to add the two Ref tags to the Details pane by changing the relevant registry key.
which makes a lot of sense. I mean it is consistent with the observations, but it does not make any sense for a UI. Given it is by Microsoft it does not surprise me too much though.

Do you know the registry changes that are required to show the data?

Cheers  Peter

Phil Harvey

...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 ($).

milchtaich

For JPG files, you need to change the HKEY_CLASSES_ROOT\SystemFileAssociations\.jpg key by modifying the FullDetails string as follows. Search for the part that includes System.PropGroup.GPS; *System.GPS.Latitude; and *System.GPS.Longitude; and change it to

System.PropGroup.GPS;*System.GPS.Latitude;*System.GPS.LatitudeRef;*System.GPS.Longitude;*System.GPS.LongitudeRef;

The underlined parts are the ones that need to be added.