If the photo file embeds information about the location where they were taken, you can do interesting things like this; go to this album, and click "View map" or "View in Google Earth" link on the right-hand side of the page just below the map. You can see the photos placed at the locations where they were taken.


It's actually easy to geo-tag photos. All you need are the photos, the IGC file of the flight, and a few free software. I did my work on Windows, but the same tools run on Linux and Mac, too.
There are three steps. I'll explain each step in detail.
1. Convert IGC file to GPX format.
2. Adjust the timestamp of the photo to the precise time it was taken.
3. Embed lat/lon information in the photo.
Step 1
There are many tools to covert one GPS format to another. I used GPSBabel. I went to the directory where I saved my IGC file (it's convenient to save it in the same directory as the photos), and ran the following command.
gpsbabel -i igc -f myflight.igc -o gpx -F myflight.gpx
Step 2
This step is not necessary if your camera's clock is set precisely. To save your time, adjust your camera's clock as precisely as possible before start taking photos. My camera's clock was off by about 3 minutes, so I needed to do this step. I used Exiftool to adjust timestamp of each photo. To move back the timestamp by 3 minutes 20 seconds, I went to the directory where I saved all photos, and ran the following command.
exiftool -AllDates-="00:03:20" -overwrite_original *.JPG
Then I checked the timestamps by running the following command.
exiftool myfirstphoto.JPG
If you don't know the amount to adjust, just go to step 3 first, show the photos on Google Earth, and see if they match actual locations. If they don't, come back to this step, and adjust until they match.
Step 3
There are many tools to embed lat/lon information to a Jpeg photo. I used gpsPhoto.pl. A little downside of the program is that it requires Perl, so you need to install Perl if you are doing this work on Windows. Another tool is Geotag which is written in Java. For the final step, I went to the directory where I saved the photos and the GPX file, and ran the following command.
gpsPhoto.pl --dir . --gpsfile myflight.gpx --timeoffset 25200 --overwrite-geotagged
The timeoffset is the difference between GMT and the time zone of the camera clock time by seconds (25200 seconds = 7 hours). Change this value depending on your time zone.
Once you geo-tagged all photos, start Picasa, and view the album which contains the photos. If they were geo-tagged sucessfully, you will see a compass icon at the lower-right corner of each photo. Select all photos in the album, and click Geo-Tag icon (Google Earth icon).

Google Earth will start up, and shows your photos at the locations where they were tagged to. Verify that they look reasonable. If they don't, go back to step 2, re-adjust the time, and restart Picasa to reload the updated photos.

You are done!

laid out on Google Earth
Click here to download KMZ file
Here is an advanced application, 3D photo album. I geotagged all photos with not only lat/lon coordinates but also the altitude the photos were taken. Below are screen shots of the photos shown in Google Earth. Each photo is floating at the altitude it was taken, and has a link to my Picasa Web Albums. Click here to download the KMZ file.



No comments:
Post a Comment