Wednesday, 19 January 2011


Today I started uploading the photos I took on 05/10/2009 to my photo website. Unfortunately when I checked the Korea Folk village photos, quite a few were obviously geocoded wrongly. (Probably most of the photos are geocoded wrongly, but it is quite difficult to get the locations accurate since the satellite imagery on google earth isn't good and most of the village looks very similar).

So the ones that were obviously geocoded wrongly, I tried to geocode them more accurately. This took quite a long time, both researching to try and get the location as accurate as possible, and then waiting for Robogeo to do the geocoding.

When the photos were geocoded with more accurate locations, this brought up a new problem. My RAW files are Nikon NEFs, and Adobe Bridge writes XMP data for the NEFs to a .xmp sidecar file. Now I had already written descriptions, keywords, etc. for all the images, but because Robogeo had updated the NEF files, they now had a later modified date than the NEFs. This meant that all the descriptions etc. I had written weren't appearing for the newly geo-coded NEFs in Bridge.

Bridge must look at the last modified date of the NEF and sidecar, sees that the NEF has been modified more recently than the XMP sidecar, and so doesn't bother reading the XMP sidecar, thinking any info in it must be out of date.

One solution is in the XMP File Info Panel you can import the file's XMP sidecar, thus restoring the 'lost' XMP data. But if you have 100s of files, this can be a pain.

Another alternative is to edit the XMP sidecar and save it, so that now the XMP sidecar file has a last modified date that is newer than the NEF file. This makes Bridge read the XMP sidecar file.

What I did was to put all the modified NEF files and their XMP sidecars in a single folder. I then used exiftool to update all the XMP sidecars in one go -XMP-xmp:MetadataDate+=1 -ext .xmp ./

However, this didn't quite work correctly. Strangely, Bridge did not read the Keywords from the XMP sidecar. Why? Who knows. So I still had to manually import the XMP sidecar files through the File Info Panel to get the keyword data back.

And then there is another problem. For some reason, with JPEGS, Bridge / the XMP File Info Panel doesn't treat the XMP data as UTF-8, even though according to the XMP specification (which Adobe created)
XMP must be encoded as UTF-8 when embedded in TIFF, JPEG,
JPEG 2000, PNG, PDF, PSD, and PostScript/EPS files
So I had to put all the newly geo-coded JPEGs into a folder together and used ExifTool to update the IPTC:CodedCharacterSet tag, which is what Bridge / XMP File Info Panel uses to determine the XMP character encoding. -IPTC:CodedCharacterSet="UTF8" -ext .jpg ./

Doing this with various photos that I'd taken at the Korea Folk Village and were mis-geocoded took most of the day.

No comments: