Anyone who would be interested has probably already heard about the Places feature of iPhoto ’09. Usinghidden tables in iPhoto database embedded Google Maps. Once you’ve done that you can browse photos by location and make some very nifty photo albums with maps. There’s more to it than that but I’d be about the millionth person to review the new features of iPhoto ’09 if I did so, so I won’t. Instead I’m going to tell you about a feature that is missing, but one that Apple have clearly been playing with.

My Geotagger program has been out for a few years now and people have been happily (and least I think so) geotagging their photos. If this is done before importing them to iPhoto everything is fine, but doing it once they are already in iPhoto’s database means that iPhoto doesn’t know about the change and consequentially won’t draw these photos on the nice new maps Apple have added. So to find a solution for this I’ve been digging around in iPhoto’s database file. It’s a simple SQLite database but I haven’t fully solved it that part of the equation yet.

The interesting thing I found, and the reason I’m telling you about this before I have finished an update to Geotagger, is that in the database I found two unused tables. For those of you that don’t know about database and tables pretend I said I just found two very interesting lists. The tables are called SqGpsTracks and GpsTracksEventsJoin. What this tells me is that Apple were working on the ability to link a GPS track with an iPhoto event for people that may have a GPS Datalogger and a camera as separate devices. iPhoto would then be able to match up the time a photo was taken with the GPS log and work out where the photo was taken. This process is pretty well documented already and I’ve been doing it for ages using Jeffrey Early’s excellent GPSPhotoLinker. It could also mean the display of routes on the embedded maps, but that can’t be proven at this stage.

Though I welcome this feature for the masses I have never fully trusted iPhoto to do any editing of my pictures. I”m quite happy doing all the editing and geotagging before hand and just using iPhoto to store and display pictures, but for those that want an integrated solution this would definitely be a step forward.

UPDATE: Others have been discovering similar things, Adam looked in the nib files and found more proof that Apple is working on interpolation.

Tags: , , ,

14 Responses to “GPS track interpolation in iPhoto ’09?”

  1. Peter Says:

    Hallo

    is it really a shame how handles iPhoto09 geotagging but there is always a possibility to improve a product. In the moment I export a lot of photos from iPhoto, geotag it – mostly with Geotagger (a very helpful product)- and re-import it – all the hard way. At least there should exist a possibility to transfer to in iphoto added geodata inside of iphoto to the exif-data.

  2. wco Says:

    Well it would be nice to have one centralized solution.

    My logger uses JetPhoto to extract logs and sync up the tracks with the pictures you import into it.

    Jetphoto will also export GPX files and while GPSPhotoLinker will sync and update the EXIFS, for some reason, iPhoto 09 won’t import those photos.

    BTW, any plans to also update iPhotoToGoogleEarth for iPhoto 09 or does the current plugin work with iPhoto 09?

    When I upload the photos tagged by JetPhoto out of iPhoto to Picasa, they show up tagged fine.

    But when I upload photos that I manually located, even though the EXIF contains GPS locations, they don’t show up in Picasa.

    The integration and interoperability of many of these tools still seem to be in the nascent stage.

  3. craig Says:

    Hi WCO,

    Yes iPhotoToGoogleEarth works with iPhoto ’09, but it doesn’t work with the Places data. That data is stored very differently to the Exif standard that has been in place. I’ll be working on an update as soon as I can, generally software that makes me money (a.k.a. employment) gets more of my time than software that doesn’t (a.k.a. hobby).

  4. wco Says:

    Understood, regarding your priorities.

    Bizarre, in iPhoto under Extended Photo Info, an automatically-tagged photo and a manually-tagged on seem the same.

    But in EXIF Viewer, the manually-tagged one doesn’t even show GPS data.

    And wow, there are so many EXIF fields.

    I guess Picasa hasn’t picked up that iPhoto stores Places data differently. Maybe Panaramio is better.

    Why do they have two different kinds of photo sharing sites anyways?

  5. craig Says:

    iPhoto stores Places data in it’s own database, the same database that stores the Events and Faces data. It doesn’t modify the actual photo image. Since Places is new and has no interface for programmers it’ll take a while for any export plugin to get hold of that data. Of course the iPhoto progammers know where and how the data is stored, so the Extended Photo Info window is able to get at it.

  6. wco Says:

    Oh, so Apple is keeping things to themselves?

    Or maybe since Flickr uploads are integrated, they share with Flickr.

    Strange that they’d use Google Maps within iPhoto but not work with Picasa or Panaramio.

  7. Joël Fisler Says:

    I did find a solution for the problem you mentioned with the already imported geotagged photos that are not recognized: you have to rebuild the iPhoto Library (see link below) and choose at least the option “rebuild Thumbnails”. To be honest: I clicked all the options when rebuilding the Library so I am not totally sure which was responsible for re-importing the EXIF data but in the end it worked and now I can see all my Photos in “Places”. Exporting and Re-Importing was not an option for me because you loose all your books, calendars, ratings and lot of other information…

    Greetings from Switzerland, here’s the Link on how to rebuild the Library:

    http://support.apple.com/kb/HT2638

  8. wco Says:

    Thanks Joel but I found out that when you export, under the File Export tag, you can check “Include Location Information” for the file.

    So I guess Picasa and others who write export plugins for iPhoto will have to add similar functionality to their software, unless again, Apple is hiding that interface from 3rd-party developers like Craig.

    I have a bunch of pictures from Switzerland a couple of years ago. Unfortunately, I will have to manually locate them and I can only approximate the locations.

    Kind of reminds you of those trips so while it’s a lot of work, it has its rewards.

    Or maybe a reason to go back to Switzerland and a lot of these other places, to tag with a logger.

  9. Car GPS Says:

    Joel is right. You need to rebuild the library.

  10. martip Says:

    Craig,

    I used and I liked very much your Geotagger, thank you for sharing it!

    I try to contribute my 2 eurocents (as I’m from Italy) with a little thing I discovered, looking at iPhoto databases like you did.

    I found one more interesting table.

    If you inspect the iPhotoAux.db database you can see ther’s a table called SpGpsTrackPoints (fields: primaryKey INTEGER, points BLOB).

    I am pretty sure that the primaryKey field will be used to estabilish a 1-to-many relationship with the SpGpsTrack table you have discovered in iPhotoMain.db.

    As the points field is a BLOB it sounds to me that it will be used to store entire track files, hopefully in GPX, KML or in any other “known” format.

  11. Rene K. Mueller Says:

    Hi,

    I coded the last two days a small perl-script which does a bit what iPhoto09 does:

    http://renekmueller.com/Computer_Diary/1240381680/Automatically_Geotag_Photos_without_GPS

    or http://the-labs.com/GeoTag/

    It uses a public domain source file, cities1000.txt or allCountries.txt – and converts it into a sqlite-db, and then lookups go fast. It finds locations, list lat/long, and displays total distance of looked up locations.

    I used it to geotag my photos which I commented with location information. I also support a simple interpolation of location based on timestamp of the photos.

    Rene

    renekmueller.com

  12. wco Says:

    OK, I’ve imported and kept about 1000 photos, all with GPS data in the EXIF, into iPhoto 09 and still have the problem described earlier, that the Places database doesn’t rely on the EXIF but instead, requires a Places name associated with each photo.

    Otherwise, what will happen is that after first displaying the correct location on the map for photos, the next time, it will arbitrarily assign to them one of the Places in your database.

    In my case, they display as being Almudena, in Madrid. But the actual photo file has the correct GPS coordinates, which are far different than for Almudena. But iPhoto in the Extended Get Info will show the Almudena GPS coordinates instead.

    If you export to a site like Picasa Web Galleries or to another application, the correct location will be displayed on the map.

    The problem occurs if I don’t manually assign it a place name. But you use a GPS logger and you go through the trouble of using another application to sync and embed GPS data into the EXIF of hundreds of photo files. When first imported, iPhoto shows the correct map location and labels the photos “photo place.”

    Unless you change that label and give it a more specific Places name, the next time you open, iPhoto assigns these photos as Almudena.

    So iPhoto is impractical and of little use for managing and displaying a large volume of photos with GPS data in the EXIF.

    Instead, I’d be better off exporting photos to another application or a site like Picasa and relying on a keyword like say Paris to show the hundreds of locations on a map of Paris where I might take photos.

    In fact, even the bundled Gisteq application, which I use to embed the GPS in the EXIF, is better for displaying not just the map but also the place name as it will look up Wikipedia to describe well-known locations near where the photo was taken.

  13. craig Says:

    That’s very strange and not what I’ve experienced at all. I can quite happily put GPS Exif data into a photo, import it into iPhoto and see the location on the internal map. No matter how many times I view the photo it does not change. I can’t begin to guess why your iPhoto changes the details it has for your photos but I can assure you it does nothing of the sort for me. Would you like to send me one of these pictures and I’ll see if I can reproduce the problem on my machine?

  14. George Says:

    Spread the word – you no longer need to rebuild your iPhoto library to pick up GPS coordinates added after importing. Somewhere in one of the recent updates Apple added “Rescan for Location” option when you right click on pictures. Only works when you’re browsing a library. Thank you Apple!