iPhone not writing Location EXIF correctly?

Ok, so everyone’s playing with the new iPhone 2.0 software, and taking photos, and embedding the location information into the EXIF.

Well early adopters in San Francisco are anyway, and here’s an interesting thing about San Francisco is that it’s at the same latitude as a bit of the Yellow Sea, just off the coast of China.

Example: San Francisco is 37.7 latitude, -122.4 longitude which puts it firmly in the Western Hemisphere. The same latitude but 122.4 longitude you end up just off the coast of China.

The Spec for GPS location in EXIF says that you’re not supposed to have any sign information on the latitude or longitude, so it’ll always be positive (i.e. the North Eastern Hemispheres) in the "GPS Latitude" and "GPS Longitude" fields (although some apps do add that information) The North/South East/West bit is supposed to be in the "GPS Latitude Ref" and "GPS Longitude Ref" fields.

But it seems at first glance, that the iPhone 2.0 software misses these fields out when writing EXIF data to the photo, so while everything else using Core-Location on the iPhone is super happy. Photos appear to be missing which Hemisphere they’re taken in.

And those photos taken in San Francisco, well, they think they’re in China … for the moment.

EXIF from iPhone

GPS Latitude    37 deg 45' 36.00"
GPS Longitude   122 deg 25' 48.00"
GPS Position    37 deg 45' 36.00", 122 deg 25' 48.00"

Missing EXIF Fields

GPS Latitude Ref        North
GPS Longitude Ref       East

Can anyone else confirm that there’s no North/South, East/West information in the EXIF, or is it hidden somewhere else and I’m just missing it?

Here be Updates:

Seems like there may be differences between first edition iPhones running version 2.0 software and the new 3G iPhones running v2 software. And also a difference between photos geotagged when the GPS is running outdoors to when they’re geotagged from WiFi location only.

26 Responses to “iPhone not writing Location EXIF correctly?”

  1. i’m currently getting N and W in my EXIF data.. extracted using the ‘exif’ command from macports:

    North or South Latitude N
    Latitude 37.00, 43.65, 0.00
    East or West Longitude W
    Longitude 122.00, 28.72, 0.00

    sadly, flickr isn’t automatically using the geotag info…

  2. I’m not able to confirm as I don’t have an iPhone; but it would be a real shame if they have dumped the “GPS Latitude Ref” and “GPS Longitude Ref” tags, as it’s not just Flickr that will have to be reconfigured to accomodate, but everything.

  3. Just found your post after reading (and posting) something similar at the Apple Support Forum for iPhone (http://discussions.apple.com/thread.jspa?threadID=1597910&tstart=0). You obviously know more about this than I do, but glad to see I was on the right track.

    For me, iPhoto gives the right coordinates (USA, NW hemisphere), but when I upload the photo to Flickr, the Long/Lat data there shows NE hemisphere (same numbers, though). That being said, as pointed out above, Flickr isn’t even putting this wrong info on its map…

  4. This seems to be a problem associated with iPhoto, not the iPhone. It’s a bug that has been around for a while, and seems to occur when you edit the photo in iPhoto. As a work around, you can import the photo onto your mac from Image Capture instead of iPhoto, since it is iPhoto that strips the “. . . Ref” tags.

    http://www.flickr.com/groups/geotagging/discuss/72157600040087961/

  5. Another link, showing that the problem is with iphoto, not the iphone:

    http://jerakeen.org/tumblelog/2008/07/42177389/

  6. This is a problem with the iPhone, NOT iPhoto.

    I use a WinXP PC and am in Australia. The Exif tags are incorrect when the photos are imported using the WinXP Camer & Scanner wizard. I have checked them using Exif Reader v3.0 and Adobe Photoshop 7.0. In both cases they show that the iPhone has incorrectly tagged my photos as being in the North and West hemispheres, when in fact Australia is in the South and East.

    C’mon Apple, fix this NOW!

  7. I just checked my pics (non-3G iPhone). EXIF is correctly set with N and W in the ref tags. I downloaded them with Image Capture in OSX 10.5 first, then Lightroom, and it worked perfectly both times. It does not look like an iPhone problem, but more of a problem with how different software is interpreting the EXIF data. Side note: still doesn’t geotag when I upload to Flickr, either manually or via Lightroom Export plugin.

  8. Duane, is it possible that WinXP Camer & Scanner wizard has a similar problem as iPhoto in stripping or incorrectly modifying the EXIF ref tags? Geotagging has been a somewhat niche activity up to now, and there are many photo programs that are not friendly with geotagged EXIF data.

    Here’s a simple method to test if this is an iphone problem or a non iphone problem:

    Go to the App Store and download “Airme”. It’s a free iphone app that allows you to take a picture and immediately upload it to flickr or the airme.com website. It is useful in that it includes the EXIF information with the lat/lon. So, whichever photo upload site you use, the photo will arrive with the lat/lon that the iphone tagged it with.

    I just used airme to take the linked picture, and as you can see (there is a map link in the lower right of the flickr page), it was geotagged by iPhone with the correct lat lon and the correct lat/lon REF tags.

    http://www.flickr.com/photos/dgalvan/2675407490/

    This is evidence to me that the iphone is geotagging correctly, but that some sets of software used to edit an imported iphone photo (definitely iPhoto, perhaps others as well) can screw it up.

    Duane, could you perform the above mentioned test and see if your iphone really is geotagging incorrectly? So far, I am more inclined to believe it is the photo editing software we are using which is causing the problems, not the iPhone itself.

  9. this is not an iPhoto problem. iPhoto *may* have it’s own issues too, but iPhone location tagged photos uploaded (via email) directly to flickr (e.g. take pic, send mail to flickr stream email addr) are not being mapped by flickr. either flickr’s not doing the right thing, or iPhone is not. either way, if it’s Apple, fix it (this was one of the only reasons I upgraded phones)… if it’s flickr, flx it (you have a massive # of iPhone pics being uploaded everyday).

    annoyed.

  10. Ok so there are several problems contributing to the chaos in iPhone geotagging and iPhoto and Flickr use here. Let me try to organize them.

    First, the iPhoto related problem, and a couple of variants on it that are still confusing me

    1.) The iPhoto problem is indeed happening (at least to me). That is, when you import a geotagged photo (from the iPhone 3G or from any other source that gives the JPG its EXIF lat/lon and lat/lon REF tags), that EXIF data is preserved, and viewable when you select the photo and go to Photos–> Get Info. However, when you modify or edit the photo (rotating it, cropping it, etc.), iPhoto now refers to a modified version of the JPEG, and stripps out the REF tags, leaving it unclear whether a photo is, say, at 118 deg W lon or at 118 deg E lon. Subsequently uploading such a photo to Flickr will result in Flickr making the assumption that the 118 (null) value in the EXIF lon tag means 118 deg E, and you get the wrong hemisphere problem. Note that you won’t be able to tell that iPhoto has stripped the REF tags from the EXIF when using Photos–> Get Info, because iPhoto only caches the EXIF data for displaying in the Get Info window at the original import, and any subsequent changes to the EXIF data are not properly reflected in the Get Info window. To see whether the EXIF REF tags have been stripped, you need to select the photo in iPhoto, right-click (ctrl-click) and go to “Show File”. You will then be shown the JPG file in Finder. Open the JPG in preview and go to Tools –> Inspector, and then click the center tab to see the location and whether the REF tags are there. If you see “(null)”, then the REF tags have been stripped. Also, in iPhoto, you can right-click on the same photo and choose “Show Original File” and do the same thing in Preview. This usually (in my experience) reveals that the REF tags are still preserved in the original, unmodified photo, but not in the modified photo.

    side note: There is an interesting complaint here: http://www.flickr.com/groups/geotagging/discuss/72157600040087961/#comment72157606300827353 which implies that perhaps iPhoto or iPhone is simply giving the incorrect REF tag to begin with. IE: a photo taken in the Netherlands (E lon) is given W lon REF tags by either iPhoto or iPhone (unclear which).

    There are also some complaints here:
    http://discussions.apple.com/message.jspa?messageID=7668654#7668654
    that imply that the iPhone only gives out N and W values for the lat/lon REF tags, no S or E values. I live in the U.S., so I can’t test for this problem, but those in Australia and Europe seem to be having it.

  11. 2.) Next e-mailing photos from the iphone: When you e-mail any photo from your camera roll on the iPhone, using the iPhone’s mail program, the photo is re-sized and the EXIF data is stripped. This means that the typical method for uploading to Flickr from your mobile phone is useless if you want automatic geotagging to work. This is something that Apple will need to fix. Currently, if you want to get an iPhone photo off your phone with it’s geotagged EXIF intact, you have to import it to iPhoto via USB cable.

    3.) Airme:
    Airme is a free app available in the App Store for the iPhone 3G that allows you to take a picture on the iPhone 3G and then immediately upload it to Flickr. When you take pic through Airme, the program does not write or read any EXIF data whatsoever. Instead, it queries the location services part of your iPhone and grabs the lat and lon data from there, automatically importing that data, as well as the photo itself, into your flickr account. The result is you can successfully and easily upload a correctly geotagged photo to Flickr. The catch is that you cannot yet do this with photos already on your camera roll, only photos you take using the Airme app. (Airme staff says they will fix this in the next version, due out within the month.) Yet another (hopefully temporary) problem is that, since Airme doesn’t write any EXIF data, the picture you took using Airme that gets saved onto your camera roll on your iPhone will not have any lat/lon values in its EXIF data. So after using Airme, the only geotagged version of your photo in existence is on Flickr. The one you import to iPhoto from your camera roll will not have any lat/lon info at all.

  12. 4.) Finally, there is apparently a problem in the UIImagePicker, a utility used by both iPhoto and iPhone which unfortunately strips out the REF tags when accessing a photo’s EXIF data. The following is quoted from a post by steview at the apple forum for this topic:
    http://discussions.apple.com/message.jspa?messageID=7668654#7668654

    “It is most probably because the iPhoto app uses the UIImagePicker API internally, which strips off a lot of the EXIF Data - apparently incorrectly removing the loc/lat ref tags here and resizes the photo.

    The only way in the iPhone to get the real image and retain all the Exif data is to read the NSData representing the JPEG directly from the file system. However, Third party apps are generally discouraged from this in the developer docs and it seems iPhoto suffers from using the same API”

  13. So, in summary:
    1.)iPhoto can sometimes strip the REF tags from the EXIF data.
    2.) E-mailing the photos from the iPhone strips their EXIF data.
    3.) Airme is a workaround that allows geotagged photo posting directly from the iPhone, but does not save geotagged photos on your iPhone camera roll.
    4.) The route of the problem in #1 is a design bug in UIImagePicker API.

    So apple needs to: fix the mail program so it doesn’t strip the EXIF, and relase an update for iPhoto and UIImagePicker that avoids EXIF stripping.

  14. i’ve upgraded my iphone to firmware 2.0 and noticed that here in switzerland, the location is set to 46.86 -7.55, while it should correctly be 46.86 7.55.

    and thanks about the exif-stripping info of mobilemail.app. i was wondering why the info doesn’t get trough to flickr…

  15. Well, I am using a Windows user in Hong Kong.

    I just took some test photos with my 2.0 iPhone and downloaded it directly from the phone (without using any tools, just plain WinSCP from the filesystem itslef)

    The GPS ref fields are not set correctly and as a result, my photo is shown to be somewhere off the coast of California.

    Resetting the sign of the Longitude to the correct side of the planet using GeoSetter cured the issue.

    – kl –

  16. SOLUTION FOUND to iPhone geotag hemisphere issue in OSX.

    I discovered that in iPhoto, if I drag the picture out of iPhoto and inspect the LAT LON, there is no negative sign on, but if I select “show origional file” and open that in Preview, there is a negative sign putting me in the right hemisphere.

  17. [...] des iPhones schluckt die exif-tags beim vermailen, deshalb landet nix bei flickr. der umweg über iPhoto oder über eine andere Applikation (AirMe) bewahrt die geoinformation. jetzt heisst: apple, fehler [...]

  18. I haven’t been able to get the ’show my location’ to work at all.

  19. I just got a 3g..and I tossed the pics into iPhoto then passed them to Picasa….

    Google reads the exif perfectly and asks if you want to use the data.
    No problems there at all, however Flickr seems to do nothing w/ the data

  20. [...] http://geobloggers.com/2008/07/10/iphone-not-writing-location-exif-correctly/  [...]

  21. [...] ●iPhone not writing Location EXIF correctly? http://geobloggers.com/2008/07/10/iphone-not-writing-location-exif-correctly/ [...]

  22. I’ve been shooting pictures in Sweden with my iPhone and uploading them both to flickr and picasa. Both sites show my pics being shot way out in the north atlantic ocean.

  23. I live in italy, my photo are placed somewere in the north atlantic ocean too, using iPhone–>iPhoto–>Picasa plugin updater–>Picasa–>Google Maps
    Terrible!

  24. I can confirm this as well - and I don’t use any Mac software or such; I take my photos directly from iPhone and upload to flickr (and our own site, which reads EXIF positions as well on upload).

    Of course, you need to have photos taken east of Greenwich to see this problem (or maybe south of Equator).

    (If flickr does not position photo at all, it’s likely because you don’t have auto positioning turned on - check your flickr account settings)

  25. I can confirm this, too. I took some pictures in Turin, Italy, but the embedded coordinates lead to a place which has the correct Latitude, but the wrong Longitude, actually corresponding to a spot in the Atlantic Ocean which happens to be symmetric to Turin wrt the Greenwich Meridian.

    See the following image (courtesy of digiKam) for a pratical explanation: http://img403.imageshack.us/img403/8272/iphonewronggpsjt8.png

  26. Mac OSX Hints: Fix iPhone geotagged images for certain geographies

    http://www.macosxhints.com/article.php?story=20080821073713119

Leave a Reply