Synching GPS data to ARW files

Started by hotwire, December 18, 2011, 10:59:33 AM

Previous topic - Next topic

hotwire

For a long time I had been using the Sony GPS Image Tracker to write gps data from my GPS-CS1 data logger to my jpegs.  The time finally came where I would go through the effort to duplicate the data to my ARW raw files.  Pretty simple, so I thought.

Based on code found here: http://forums.eye.fi/viewtopic.php?f=3&t=1148

exiftool -tagsfromfile %d%f.JPG -gps:all -ext arw "e:/my pictures/2011/2011-01/2011-01-01/*"

The process tool longer than I expected, but eventually appeared to work fine and dandy, until I had one directory go screwy, and LR said the images were unreadable.  When I went to check the directory, and I was perplexed to discover that exiftool had written directly to the arw files and not to the xmp files, but kept the original arw files are *.arw_original.  Doing a little bit of reading, I discovered that this was by design, and was able to delete the new arw's, restore the originals, and rewrite the gps data and eliminate the apparent corruption.

First off, I'm glad that exiftool had this behaviour, but it now results in a doubling of the files stored on my now seemingly too small 2TB hard drive.

Anyway, my question is, since I'd prefer my RAW files to stay unmangled as much as possible, is there a string of code that I can use to undo what I just did, and instead store the gps data in the xmp sidecar file, instead of writing directly to to the arw?  Additionally, is there a way I can get Geosetter (which uses exiftool) to also not mangle the arw's when tagging in future?.

Thanks.

Chris.

Phil Harvey

First, let me deal with the corruption issue.  LR should be able to read ARW images written by ExifTool.  I just tried this with ExifTool 8.73 and a wide range of ExifTool-edited ARW images, and found the LR 3.6 wouldn't read the A200 or A700 images.  However, the Sony IDC utility and dcraw have no problems with these images.

What version of LR and ExifTool were you using, and what model camera?

This bug should be reported to Adobe.

Second, to operate on XMP files instead of the ARW, add -srcfile %d%f.xmp to your command.

Also, it is better not to specify individual files on the command line, so your full command should be:

exiftool -tagsfromfile %d%f.JPG -gps:all -ext arw -srcfile %d%f.xmp "e:/my pictures/2011/2011-01/2011-01-01

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

hotwire

Quote from: Phil Harvey on December 18, 2011, 02:08:31 PMWhat version of LR and ExifTool were you using, and what model camera?

This bug should be reported to Adobe.

Second, to operate on XMP files instead of the ARW, add -srcfile %d%f.xmp to your command.

Also, it is better not to specify individual files on the command line, so your full command should be:

exiftool -tagsfromfile %d%f.JPG -gps:all -ext arw -srcfile %d%f.xmp "e:/my pictures/2011/2011-01/2011-01-01

Thanks Phil.  The corruption only seemed to occur in one directory out of quite a few I ran it on.  Can't explain it, but all is good now.

Phil Harvey

If the corruption was not repeatable, then usually the reason is a failing hard disk.  You should make sure that your files are well backed up because problems like this tend to get worse rather than going away.

I will pursue the problems I found with LR 3.6 and the A200/A700 ARW images, and submit a bug report myself.  I tried a single image from each Sony DSLR, and the A200/A700 problem was repeatable with LR 3.6.  I just tried LR 2.4 and PS CS4, and neither had this problem (although both did have the known color problem with the A200 image).  I also tried DNG converter 6.4 and it didn't have the problem either.  I will run some more tests on LR 3.5 and PS CS5.

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

Phil Harvey

False alarm.  After going back and trying LR 3.5, and downloading the trial version of CS 5.1 (neither of which had any problems with these two edited ARW images), I went back to try LR 3.6 again...

But first, I erased my Lightroom library folder and started from scratch.

This time there was no problem when I tried importing the same images as yesterday.  So it seems there was something about my Lightroom library that prevented these 2 edited ARW images from being imported.  (This was 2 images out of 27, from the following camera models: DSLR-A100, DSLR-A200, DSLR-A230, DSLR-A290, DSLR-A300, DSLR-A330, DSLR-A350, DSLR-A380, DSLR-A390, DSLR-A450, DSLR-A500, DSLR-A550, DSLR-A560, DSLR-A580, DSLR-A700, DSLR-A850, DSLR-A900, NEX-3, NEX-5, NEX-5N, NEX-7, NEX-C3, SLT-A33, SLT-A35, SLT-A55V, SLT-A65V, SLT-A77V.)

I'm not sure what was causing the problem because I thought I had the "Don't import suspected duplicates" option (which could potentially result in the observed behaviour) unchecked.

So my conclusion is that the LR 3.6 import problem I observed may have been operator error on my part, or something funny with LR 3.6, but at least I can say for sure that it wasn't a problem with the files that ExifTool wrote.

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