Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Fix iPhone geotagged images for certain geographies iOS devices
Unfortunately, there's something awry with the way the iPhone's geotagged photos are being handled in OS X. At the moment, whether you import photos through iPhoto, Preview or using Image Capture, at some point the GPS reference may get set to North/West. This is a problem if you don't live in the northwestern hemisphere.

Regardless of whether Apple fixes this, you're still going to have to retag all of your old photos. So tonight, I wrote an AppleScript that automates the process. This script can either be set as the Automatic Task in the ImageCapture utility, or you can drag files onto the script for processing.

Copy and paste the code below into Script Editor, customize for your location, and then save as an application (eg. File Format: Application). I've #commented the code to help you find where to tweak the North/South/East/West variables.
(* This script can either be set as the Automatic Task in the ImageCapture utility or you can drag files onto the script for processing.

FIRST: the script checks each file to see if it's been geotagged (otherwise screenshots and saved images that are in your camera roll end up getting tagged with the coordinates 0,0)
SECOND: it changes the reference data on any images that hold an unwanted compass point (eg. North) to the desired reference points (eg. South & East) *)

on open theFiles
  repeat with aFile in theFiles
    #this next bit searches for files that are inappropriately tagged GPSLatitudeRef = N (eg. North)
    #however, depending on where you are, you may want to change it to search for files tagged West (eg. Ref = W)
    do shell script "if (exiftool -v " & quoted form of POSIX path of aFile & " | grep \"GPSLatitudeRef = N'djamena");
    #Change the =S and =E to the desired compass refernces. (South & East are good for Oceania)
    then exiftool -overwrite_original_in_place -gpslatituderef=S -gpslongituderef=E " & quoted form of POSIX path of aFile & "
    fi"
  end repeat
end open

(* As far as I know this works, however I take no responsibility for any loss/gain of data which results from the use of these 1's and 0's. Please share if you see anyway that this script could be improved. *)
[robg adds: I haven't tested this one.]
    •    
  • Currently 2.14 / 5
  You rated: 5 / 5 (7 votes cast)
 
[7,918 views]  

Fix iPhone geotagged images for certain geographies | 2 comments | Create New Account
Click here to return to the 'Fix iPhone geotagged images for certain geographies' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix iPhone geotagged images for certain geographies
Authored by: jaydisc on Aug 30, '08 09:29:19PM

I see two issues with this hint:

1. The script won't compile in Script Editor.
2. I have no exiftool on 10.5.4 system



[ Reply to This | # ]
Fix iPhone geotagged images for certain geographies
Authored by: monototo@gmail.c on Sep 01, '08 08:02:02AM
ummm, yeah, sorry.
I'm not sure why needing to install the exiftool didn't get mentioned in the description.
you can get it here http://www.sno.phy.queensu.ca/~phil/exiftool/

as for the lack of compiling.. :/ it appears submitting the script to this site has messed with some of the formatting.
I've posted a copy on my blog http://monototo.wordpress.com/2008/09/02/iphone-re-geotagging/
and tested it.. i think it's now working, but let me know if you have any more difficulties.

Thanks for the feedback!!! :)

---
toto

[ Reply to This | # ]