Thursday, August 30, 2007

MetaData Madness

So, I just got back from a 6 week holiday (fantastic, I'll write about it soon) with 5000 photos and a bunch of GPS tracks, so what happens now?

I use Aperture on my home iMac/24 for most photo management, but it does not 'fit' on my MacBook, so while on this trip with camera and laptop, I though I'd use Image Capture and iPhoto 6 to manage the photos.

Every couple of days, I'd plug in the camera, get Image Capture to just copy files to a folder, with no processing. Next import them in to iPhoto (with the preference to NOT copy to iPhoto's folder) so it is easier to begin viewing, selecting and showing the photos. Next I'd plug in the GPS and copy off the latest tracks using gpsbabel+.

Back home I then went through the whole lot in iPhoto, deleting from the Film Rolls the photos I'd never want (about 50%). I quickly realised that deleting a photo from a roll in iPhoto and emptying iPhoto's Trash did not result in the original being deleted, so I'd have to use iPhoto to export my selection. This was when I realised that I had tweaked a few photos in iPhoto, and after export, they had lost their colour profile and a bunch of exif tags (naughty naughty, even revert did not restore the missing data!!). I would need another way of extracting my complex selection from iPhoto, to import into Aperture.

I had a look in my iPhoto Library Originals, the Rolls were being kept as folders of aliases to the originals, so it was a simple matter of selecting the aliases (iPhoto had been deleting aliases of deleted photos), right-clicking to choose Show Original, resulting in a new Finder window with the originals selected, which can now be labelled for later extraction.

The next step was geotagging the photos from the GPS tracks. They were incomplete (see here) so I did not want to use a completely automated technique (like this). Instead I decided to buy a license for HoudahGeo. One by one, I imported the Rolls, then imported the GPX files that covered that time period. Usually about 50% of the images needed geotagging by hand. This was often because the photos were taken at anchor with the GPS turned off, so it was just a question of selecting multiple images and then choosing a map location for them all in one go. The final step was to reverse-geocode the images ...... a nice little trick in HoudahGeo, it looks up the location in a geocode database online, and fills in the Country and City EXIF tags (great for Smart Folders in Aperture!!).

Now I am finally ready to import the images into Aperture. (One big nuisance with Aperture is the inability to write Latitude and Longitude into images. It has to be done before import.)

I decided that I would retain the grouping by Roll. I made a folder in Aperture for "Trips/Caribbean/Projects" and imported each roll as a project. Next I made Smart Folders for each country in "Trips/Caribbean" then moved those to "Trips/Caribbean/Locations". (Make them first, then move them, or they will not work).

Now I can start making Albums for different purposes, images to give to friends, images to make a book for the boat to say 'thanks', images for Flickr etc.

MetaData Madness, maybe, but I am convinced that looking after the metadata will pay dividends in the future.

Things to remember :

GPX files are always marked up in the UTC +0 timezone, even if you change the display timezone on the GPS (so I do not change mine).

If you move across timezones and you change the timezone of your camera, always remember to take a photo of the current (UTC +0) time on the GPS, so you know the offset to enter when you use automated geotagging tools.

The Finder, Spotlight etc. automatically convert image creation times to your local timezone set on your Mac, so if you want to use Smart Folders to select complete days of photos you will get an offset unless you switch your Mac to the timezone the camera was in (and restart the Finder).

Editing Tracks in GE

It is possible to edit GPS Tracks imported into Google Earth, but it is not obvious or intuitive.

Lets say you opened a GPX file (imported from a GPS) in Google Earth, you'd have a new entry in in 'My Places', probably called 'GPS Device'. Keep on burrowing down through 'Tracks', "ACTIVE LOG n', finally to the 'Path'.

Right-click on the 'Path' and choose the 'Get Info' menu item.

Your path is now in editing mode (weird huh?).

In the dialog, you can change the colour of the path etc. etc. but in the main window, you may now edit the path (eek dialog, go away!!).

There are several different cursors.
The square cursor will add a new point, after the currently selected point (not easy to know which this is). This may be used to insert a new point between existing ones, or add a new point at the start or end.
The hand cursor appears when you mouse-over a point, this can be used to move it.
Hold down the Control key and click on a point to delete it.

That is all I found out about by playing.
I could not work out how to select or delete multiple points or anything advanced like that.
I do wish the guys at Google would let someone who knows Adobe Illustrator show them how path editing works there, it is far superior :)

NB. This is for the Mac version of GE, I am running 4.2.0180.1134 (beta).

Simplifying GPS Tracks

Originally uploaded by sharkbait.
In my last post I talked about needing a tool to simplify GPS tracks, to remove the spikes and squiggles you get from inaccuracies in the GPS readings and stuff like swinging around on anchor chains.

Here is an image from Google Earth showing us anchoring. There are two tracks, one containing the full data, one showing the simplified data.

I think together they show quite well how a boat moves over time on an anchor.

I simplified the track using gpsbabel :

gpsbabel -i gpx -f 20070806.gpx -x position,distance=6m -o gpx -F 20070806-dist-6.gpx

This gets gpsbabel to filter the track, removing points that are closer than 6 meters together.

I went through a bunch of different distances, 6 meters gave me the most pleasing results, but the correct distance is probably going to be related to your speed.

This filtering makes almost no difference to the shape of the main track curve, only to the heavily crowded parts of the track where we were close to stationary.

Wednesday, August 29, 2007

GPS Shenanigans

I had a GPS (Garmin GPSMap 60CSx) for the first time, to take on a long sailing holiday, to be able to geotag all of the photos I took and maybe publish some tracks to Google Earth.

How did it go?

Not all plain sailing ....... here are some of the issues.

Maps were the first problem. The basemap on my GPS, showed no landmasses for most of the islands in the West Indies. I had managed to find a good Open Source map of the area just before leaving, but was unable to load it onto the device.

The first problem (got stuck on this while away) was I had updated MacOSX to a version that broke USB connectivity in Parallels (needed to run the MapsSource uploader), so the GPS was never going to connect to Windows. The few net connections I found while away were so bad I was not able to find this out, let alone solve it until I returned.
Once that problem was solved, I tried to upload the maps. Windows would crash after about 10 minutes (of 40) of uploading. No go, must be an instability in Parallels. Next I tried the new beta Mac MapInstall from Garmin. It just refused to do anything.
I finally got to run MapSource under VMWare Fusion instead of Parallels, the transfer worked first time. I have the map on a chip now, but of course I am no longer in the West Indies :)

The next problem was battery life.
When I was doing my online research before buying my GPS, I saw many otherwise attractive units with stated expected battery life of like 3 hours. That is so useless I have no idea why anyone would buy one. I was attracted to the Garmin unit I bought, because it was supposed to have a 40 hour battery life on two AA batteries, still too short IMHO, but becoming reasonable.
As it turns out, 40 hours is an outright lie. With two high power throwaway batteries, you would be lucky to get 10 hours. I do not like to use disposable batteries, so I bought a set of the highest power rechargeable batteries I could find, Nickel Metal Hydride rechargeables with a stated 2700 mAh capacity. The unit has a special setting for Ni-MH batteries (lower voltage, run slower) but I would struggle to get 5 hours.
Keep in mind this is 5 hours of the unit just making a track, not 5 hours of heavy interactive usage, calculating routes, displaying complex maps!!! 5 hours is not enough. It became too difficult to keep batteries charged and changed (power is always a bit ropey on a boat).

So I have ended up with incomplete tracks of my trip, very frustrating considering how much money I paid and effort I put in.

I have now geotagged all of my photos (using HoudahGeo), the tracks did help.
Next I'd like to play with making them into KMLs for Google Earth.
One problem I am facing is if you leave the tracking on while stationary, you get a rat's nest of spikes and squiggly lines as the boat swings on it's anchor and/or the accuracy of the GPS varies. Now I need a good track editor (suggestions anyone?).

What will I do differently next time?

1. Prepare maps before I leave.
2. Bring an adaptor that allows me to run the GPS off the boat's 12V power supply.

Sunday, August 26, 2007


I got this email :

> Hi Jeremy,
> I am interested in advertising on your web page: Credit Card Craziness
>The ad would be for a credit card directory, and it would consist
> of a 2-3 lines of text with links to their web site. I can pay you $35
>for the ad, and send it via PayPal, or check.
> Would you be interested?

I guess I am slightly flattered, however I said "thanks but no thanks"

Never heard of this before