Howto: Geo-tagging photos for an easy map mashup

Next month, I’ll be heading to the US to travel across the country and to talk to ordinary people about the issues that are important to them in the presidential election. I did similar trips for the BBC in 2000 (that’s me behind the floppy hair) and 2004, and I often credit the BBC’s Steve Herrmann for encouraging me to blog. This time I’ll be travelling with James Ridgeway and the Guardian Films team. Jim and I will be vlogging, blogging, Twittering and Flickring our way across the States. I’m keen to geo-tag as much as possible to give people another way to follow the story.

We’ve got a lot of ground to cover, both in terms of miles and in terms of the journalism so I’m looking for all sorts of time-saving ways that we can give the kind of rolling road trip coverage that is expected in the age of internet journalism. I want readers to feel as if they are there with us in the car. I plan to use Twibble mobile and Twittervision to geo-tag our Twitter updates. That’s tomorrow’s work.

Today, I’ve managed to figure out a way to easily tag and post all of my photos. I’ll be using a Nokia N82, which has an amazing 5-megapixel camera, brilliant (in every sense of the word) xenon flash and built-in GPS. Right before Suw and I left on our walk last week, I discovered the Nokia Location Tagger application. It automatically adds geo-data to the EXIF file of your photos. Nokia recently stopped work on the application, but there are rumours that it will be added to an upcoming firmware update for the N-series. UPDATE: Ricky Cadden, from Symbian Guru, says that the firmware has been updated. I’m still hunting for the setting to enable it, but it’s there.

UPDATE 2: Ricky comes up with the goods and how to enable geo-tagging with the updated firmware:

The setting is admittedly a bit hidden, you should open the camera and then press the left softkey to open the options submenu, and go into the settings. There you will be able to activate the geotagging feature. You can confirm this as a small satellite icon will appear in the bottom left corner of the camera viewfinder, so that you can easily see whether or not you have a good GPS fix.

It took from a few seconds to almost a minute for the Location Tagger application to acquire a location. I used assisted GPS, which triangulates using geo-data from mobile phone masts (cell towers) to help increase the speed and precision of the GPS. UPDATE: Ricky also said that the A-GPS works slightly differently in the N82 and other new S60 devices, using the data connection to off-load positioning tasks to a server to speed the GPS lock. The positioning information embedded in the photo files turned out to be scarily accurate, showing the outlines of churches where we took photos.

My next challenge was how to easily get the embedded geo-data into Flickr and out of the EXIF file. When I first uploaded photos, I found I had to cut-and-paste the geo-data from the additional EXIF data in the photos. That was too cumbersome. However, Flickr has a not quite, but just about, hidden setting to ‘Automagically import GPS information as geo data‘. Tick the box ‘yes please, that would be lovely’, and you’re laughing. I can even upload directly to Flickr from the N82, although my Pay-as-you-Go data tariff quickly becomes pay-through-the-nose so I rarely do that unless I’m near a WiFi hotspot. I usually wait and upload from the phone via USB cable to my computer.

With that problem solved, the photos were plotted on a map. You can now see an extra ‘Map’ option below each geo-tagged photo.

Flickr with geo-tagged informatioin

Also, at the bottom of your Flickr photo page, you’ll see feeds that have geo-data embedded in them, a geoFeed and a KML feed, the latter which can be used on Google Maps and Google Earth. (A Google Maps representative told me that a browser-based version of Google Earth is on its way, although it will initially only work in Internet Explorer.) UPDATE: Keir Clarke, from Google Maps Mania, says: “A browser-based version of Google Earth is already available. It isn’t restricted to Internet Explorer but is restricted to Microsoft operating systems.”

GeoFeed and KML feeds from Flickr

Now, this will show you the last 20 items in your full feed, and I will be travelling for more than a month and hope to shoot hundreds of pictures. How am I going to create some kind of archival map? Adam Franco has developed a wonderful script to generate a KML file from an entire Flickr photo set. Thanks Adam, it’s a brilliant piece of work with some basic options. You’ll end up with a KML file based on the name of your set. You can then upload the KML file to your server and either use Map Channels or Google My Maps to generate the map.

If you only want the most recent photos, you can just use the KML or geoFeed from Flickr and use that URL. If you only care about the last 20 photos in a set, you can get a geoRSS feed simply by adding &georss=1 to the end of the feed URL. Google My Maps even has an import feature if you can’t host the KML file yourself. (Or for some reason the powers that be won’t give you access to a server. Not as if that ever happens.)

You can choose whether you want a satellite or map view. If you can’t use an iFrame in your CMS, throw it into a widget on Widgetbox. You can usually find a code format that your CMS will like (or allow). And voila. You now have lovely map ready for embedding using an iFrame. These are pictures from our recent walk along the Offa’s Dyke Trail.


View Larger Map

Comments are closed.