How to set longitude to negative in Applescript, in iPhoto?

85 views Asked by At

I have thousands of photos in iPhoto (due to an import from a bad data source) with bad geodata, where all the longitudes lost their minus signs.

In every case, I just want to put a minus sign on the longitude.

How can I, for every photo, set longitude = -longitude?

1

There are 1 answers

1
jackjr300 On BEST ANSWER

This script set the longitude to negative.

tell application "iPhoto"
    set tc to count photos
    repeat with i from 1 to tc
        try
            tell photo i to if longitude > 0 then set longitude to -(longitude)
        end try
    end repeat
end tell