Garmin 305 + Camera = Photos on Maps

I have a Garmin Forerunner 305 (which is a GPS running/biking workout helper) and a Canon 870IS (pocket digital camera). Since each device records the date/time with its information, you can later combine the latitude/longitude from the GPS with the photos from the camera to be able to see pretty exactly where your photos were taken (this is called "geotagging" your photos) and to create something like this:

View Larger Map
In this post, I'll go through the various steps necessary to create that result using my GPS logger and digital photo set-up but many of them are transferrable to other loggers and set ups (though at $169, last I checked, the 305 is a steal). I use Picasa, Google Maps and Google Earth because I think they are good products but you should know that I may not be unbiased because I also work at Google.  Other photo managers and hosting services can be used.  From the looks of it, Flickr does this very well too.

Taking Pictures
When you are ready to start taking pictures, turn on your GPS logger. For the Garmin, I also needed to "start" my "run" in order to record the GPS log.  You don't need to do anything special when you take pictures and when you are finished taking all the pictures you want to appear, turn off your GPS logger.  On the Garmin I also needed to "stop" my "run."
Downloading the GPS log
If you haven't already, you'll need to install the Garmin Forerunner 305 drivers and software (these links are for Windows).  Then open up the Garmin Training Center software (ug, relatively horrible and proprietary) and download your GPS log from the device.  Find the part of your "history" from when you took the pictures and note the date/time from the very first entry (you'll need it later). You should then be able to right-click on your log and "Export" it.  Unfortunately you can only export in the little-supported Garmin format, so choose a place where you'll be able to find it and export as .tcx.
Converting the GPS log
There are a number of ways to convert from TCX to GPX (a much more commonly supported format).  I used the online converter from gpsvisualizer. You could also download a perl script to do it locally. In either case, you need to save the resulting GPX file for the next step.
Synchronizing your pictures with your GPS log
To match my images to where they were taken, I use GPicSync.  It is a relatively simple program and works best if you have segregated the pictures you want to geotag into their own folder.  It will then ask for that folder's location and the location of the GPX formatted GPS log.  You'll also need to have GPicSync calculate the correct offset between the date/time recorded by your GPS logger and the date/time from your camera.  To do that, go to "Options|Local Time Correction" in GPicSync and enter in the time from the first enty in the GPS log and the relevant bits of time from the first picture (for example if the GPS log time start was 15:08 and you waited a bit before taking your first picture which was at 8:15, you'd enter 15:08 and 8:08).  Now you should be ready to geotag the photos by clicking "Synchronize."  If you leave the rest of the default settings intact each of your images should now have a lattitude/longitude in its EXIF geolocation field and you should get a backup folder with the photos as they were before you synchronized, a log in your photos folder and a KML file in your photos folder. After checking that everything went well, you can delete the backup folder and two extra files.
Creating a KMZ file in Picasa
Open the picture folder in Picasa (you may have to import them into Picasa if it is not already there).  You should see a small crosshairs in the bottom right of each photo and be able to see lattitude/longitude informaiton when you choose "Properties" when viewing a photo.  You should then select all of the photos that you want to include on your map and choose "Tools|Geotag|Export to Google Earth File."  This may take a little while, but should produce a KMZ file that contains thumbnails and smaller versions of each of your images.  The KMZ file can be opened directly in Google Earth and should show your pictures where they were taken.  For example, here's mine.
Uploading the KMZ file to the web and importing it to Google Maps
Upload your KMZ file to somewhere on the web that is accessible to the world.  I used Google Sites, but this can be anywhere.  Then sign in with your Google Account and go to Google Maps.  Click on the "My Maps" link and "Create New Map." Choose the map's title and publication settings and then click "Import" and provide the URL for your KMZ file on the web.  You should then have a Google Map window which includes your images.  Click "Save" and "Done" and you'll see what other people will see when they come to the map.
[NB: Though it seems based on the "Import" dialog box that you should be able to upload directly from your computer, I couldn't get that to work for me.]
Enjoy!

Google + Authors + Publishers + Libraries

After a long negotiation, along with the Authors Guild, and the Association of American Publishers (AAP) on behalf of a broad class of authors and publishers worldwide, Google announced last week that we've reached an agreement that will greatly expand online access to millions of in-copyright books in the U.S. If approved by the court, the agreement will also resolve the two U.S. Google Book Search lawsuits.
Here are a few links worth reading: Google blog post, joint press release, executive summary [pdf] and Google site.
Information for authors and publishers is at the Settlement Administration site.

Playing with Gmail

Been doing a little playing around with Gmail and regexes of late. A few things to note: (a) fetchmail is great, (b) if you want to backup your entire gmail account on Windows, this Life Hacker Guide is great but be sure to read the comment about port 995, (c) Google appears to only allow a certain number of pop messages to be fetched per connection, meaning you'll have to rerun fetchmail a bunch -- I don't think this is an error in how fetchmail is set up, (d) if you are looking for a good way of stripping attachments, try mboxscrub.pl from O'Reilly (though likely you'll need to modify the regex for the beginning of a new message (in the elsif condition), I think "/^From /" without the trailing dash is correct. It is amazing how much poorly structured data is in a few years worth of email.

GPSBabel (wonderful)

I bought a Garmin 305 a while ago (their new model looks even better) in the hopes that a gadget would spur me to exercise and to play around with geocoding photos. It has mostly worked. It did get me to exercise more and getting data on my runs is very satisfying but its windows software is sluggish and not that great. Plus it uses its own weird format making using the data elsewhere a bit of a pain. Fortunately, GPSBabel exists and was really easy to install. Just a quick "apt-get install gpsbabel" and the addition of "blacklist garmin_gps" to /etc/modprobe.d/blacklist to make sure gpsbabel's usb driver is used instead of the default one on my debian/knoppix system. Then I use "gpsbabel -t -r -w -i garmin -f usb: -o kml -F out.kml" to create a KML file that is more useful. Woohoo! Will post more on geocoding photos (which it is fabulous for) in Windows and Linux later.

La Paloma *

based on the recipes found in Cocktail Jen (from Esquire) and The New York Times

3oz fresh grapefruit juice
1oz fresh lime juice
simple syrup to taste
soda
Optional: 2oz tequila (I used Conmemorativo)

Most recipes recommend starting with a grapefruit soda (Jarritos is recommended with others using Fresca or Safeway Select). I like the fresh fruit as long as it is well strained to get rid of the pulp. It also allows you to make the drink lighter and less sweet (especially for the non-alcoholic version). Some serve it with a salt rim, such as the version in the photo (credit to Urban Mixer), but I leave that off and serve it in a tall glass with lots of ice.

* I've been on a bit of a tear making interesting drinks at home. Mostly non-alcoholic though alcohol could go in most of them. Anyhow, I figured I would post some of the recipes here to spread the joy of a refreshing summer drink. Where they are consciously based off the creations of others, I'll post links.

Books are weapons in the war of ideas


David Weinberger describes a visit to the Open Content Alliance's scanning operation at Boston Public Library. A healthy dose of optimism after the sad news that Microsoft has stopped its scanning operation. The title of the post and the image on the right is from a U.S. Government war poster digitized by Boston Public. You can see the rest of the set or more from Boston Public at Flickr.

Congratulations to Boston Public and the Open Content Alliance.

 
[disclosure: I work on Google Book Search]

FOIA and Copyright

Another problem with crown copyright comes to light as British Columbia uses it to restrict distribution of FOIAed documents. Before you feel all superior (if you are an American), though the US doesn't have crown copyright (or federal copyright in the US in most situations), the federal government may be able to claim copyright abroad and states may also claim copyright. So this also could have happened here.


PS A good article on US government copyright is Becky Dale's column "Can The Government Copyright Public Records?"


Update: Only four days later comes news from Boing Boing that the State of Oregon is asserting copyright in the arrangement, compilation and notes of its revised statutes. Ug.

Graham: Creativeness, Roles and Companies

Paul Graham is a great writer and has written many great essays. His most recent makes the argument that humans are "naturally" suited to not having bosses and not working in large companies (he talks about the difficulties of groups over 8 people). I agree that there are many downsides to working at companies and I could certainly write about the upsides and why I love what I'm doing at Google, but that wouldn't really be disagreeing with Paul. I don't take him to be saying that starting your own company is always better, just that you should be aware that organizations of greater than 8 people have a cost that should be taken into account. He talks about it as being a "restrictiveness" that takes toll on creativity and says that it is a particular problem for engineers. Which brings us to his dismissal of why others won't feel the pinch:
"The restrictiveness of big company jobs is particularly hard on programmers, because the essence of programming is to build new things. Sales people make much the same pitches every day; support people answer much the same questions; but once you've written a piece of code you don't need to write it again. So a programmer working as programmers are meant to is always making new things. And when you're part of an organization whose structure gives each person freedom in inverse proportion to the size of the tree, you're going to face resistance when you do something new."
I don't agree with this characterization of programmers as more creative than others. It is true that you never have to write the same code again (though how many times have you written authentication or a wrapper around an authentication class) but that doesn't mean that everything you write flows out of a brand new non-linear creative endeavour any more than a sales person's pitch is entirely new. Sales people sell services that have never existed (and then they get engineers to code this selling process into an online flow and move on to selling new stuff). Support folks get entirely new questions all the time (and then get engineers to code a system for responding to the easy stuff in an automated way). These folks that Paul singles out as being less restricted (or less "meant" to create) do all sorts of breathtaking new things too. I've seen support folks handle a very angry person with an issue with a brand new type of product by creating solution to the user's problem and explaining it in a way that is brilliant. I've seen sales folk come up with entirely new types of business arrangements or finding an elegant "in" to a relationship. It is certainly true that both of these groups do a bunch of work that is less creative, but so do engineers, even at startups (gasp!). These are the things that follow the creative move, things like debugging, unit testing, perfecting UI, etc. A good startup as well as a good big company, will value creation (and the stuff after the creation) in all of its people, not just the ones that are from Paul's chosen tribe.