28 Jul 2008

Photo tutorial, part 1 - Geotagging

With the one and only hugin edging towards a release, I thought it might be worth typing up a series of notes about the photo editing tools I've been using lately.

So the first bulletin is about Geotagging using Linux. There are quite a few tutorials out there, and they're all, quite frankly, rubbish. Here's what I do and how I do it. Three packages are required: exiftool, gpsbabel and gpscorrelate.

First, get yourself a sweet, cheap yellow eTrex and a data cable. I am SICK, SICK, SICK of all the morons on Panoramio, Geograph, Flickr etc who are incapable of pinpointing the correct location on a map. BUY A BLOODY GPS!

Just before you start photographing, turn the GPS on, get a fix, and change the display so that it shows the time of day, and take a photo of it. Carry the GPS with you, enjoy yourself, take nice photos.

Then come home and upload your photos to a nice clean new directory. First, we're going to use exiftool to adjust the EXIF date-time of all the photos according to the GPS date-time that was shown on your eTrex when you photographed it.

Look at the photo of your eTrex. For example, if the time in the EXIF data is 21 seconds earlier than the time shown on the GPS, you need to add 21 seconds to the EXIF data using the command

exiftool -AllDates+="0 0:0:21" .
This will correct the EXIF date-time of all the photos in the current directory (use your common sense - if the time in the EXIF data is one minute 18 seconds later than the time shown in the photo, use -AllDates-="0 0:1:18"). It'll create new copies of all the files; the originals will be renamed from *.jpg to *.jpg_original.

I mean, obviously, given the inevitable small discrepancy between your camera's time and the GPS's time, the GPS is the one that's right, right? So you want to fix all your photos, right? And you can do this all in one go with just one exiftool command, right? So why the bloody hell don't any of the bozotic so-called tutorials out there ever mention it?

But don't attempt to compensate for time zone differences at this stage. You'll want your photos to have the correct local time in the EXIF data (since you're about to write some additional tags that contain lat/long and UTC.)

Next, plug in your eTrex with your data cable. Turn on the eTrex, make sure that SETUP -> INTERFACE has I/O FORMAT set to GARMIN, and use gpsbabel to grab a copy of the active track log. (My data cable is serial and plugged into ttyS0; YMMV.)
gpsbabel -t -i garmin -f /dev/ttyS0 -o gpx -F tracklog-$(date '+%Y-%m-%d:%T').gpx
And now fire up gpscorrelate-gui.

Click the 'Add...' button and select all your photos. Click the 'Choose...' button and select your track log. Now set 'Max gap time' to something like 300 seconds, and set your time zone (negative is west of the prime meridian) - it'll remember these two values, so you won't need to set them every time. Don't tinker with the Photo Offset! Leave it at 0! And finally, just click 'Correlate Photos' and watch the miracle of geotagging unfold in the blink of an eye.

Easy, innit?

25 Jul 2008

Architectural Backblog

It's been far too long since I posted anything here so let's do some unfocussed moaning about old buildings.

The local newspaper has noticed the dismal state of Wapping Road School (Historic school being left to rot), which I wrote about on 8th December last year. Apparently the planning impasse that was holding up redevelopment is now almost at an end, but a huge amount of damage has been done, and one can't help wondering how much more intentional damage will be done in the name of redevelopment. Yeah, more flats. Indeed, with the current economic downturn the question is when or whether work will actually start, and how much more deterioration will occur meanwhile.

My attention was originally drawn to the school by a report on the urbex forum 28dayslater. Well, 28dayslater went into a self-imposed sulky freeze for a while, but now it's back - hoorah! - and the brave explorer of Wapping Road School, converse1, has just posted a report on another of my minor obsessions, the Grade II listed chapel in Bowling Cemetery. Shipley43 on flickr passed this way too recently and refers to the 2003 grumble from Bradford Building Preservation Trust about this and three other cemetery chapels. Needless to say, no progress is made, the building is getting worse year by year, set ablaze and torn apart by vandals, with no realistic prospect of being saved.

The hot online mapping news is that Microsoft's Live Search Maps has just rolled out detailed oblique angled aerial photography data (which it strangely calls 'birds eye').  It's quite high resolution and seems to date from 2007.  The official announcement stated Calderdale was the only place to get this in the whole of Britain, but in fact Bradford is also included.  By contrast, Google's coverage is stuck back in 2002 and Microsoft's vertical data, purportedly copyright 2007, is even older than Google's (see, eg, Bolton Woods quarry).  However this is historically quite interesting because 2002 predates the disastrous mass demolition of Forster Square and Broadway.  Compare below to see the extent of the damage.  And now this week we are informed that the current flurry of work on the Forster Square site is just a blip (strangely coincidental with the council elections) and the site will sink back into inactivity until more tenants are signed up.  Pity poor Bradford.