h1. PhotoPlanet.py README
Jamie Lawrence, 4th August, 2006
*This is a small script to “locate” your photos in “Google Earth”:http://earth.google.com/. It takes a GPS tracklog and a collection of photos, and generated a KML or KMZ file that allows Google Earth to pin thumbnails of your photos at the location where they were taken*
* Python 2.4 (tested on “ActiveState Python 2.4 for Windows”:http://www.activestate.com/Products/ActivePython/)
* Google Earth (v3 works fine, v4 should also work)
* “EasyGPS”:http://www.topografix.com/ (for generating .gpx files). Free.
* A GPS device (most work with EasyGPS, I used a Garmin 60C)
Unzip this directory to any location. Done.
* Make sure that your camera and GPS device are synchronised to exactly the same time
* Make sure that your GPS device is recording a track log whilst you are taking photos
* Load the tracklog into EasyGPS and save it as a GPX file
* From a command prompt, call PhotoPlanet as:
python PhotoPlanet.py -g <.gpx file> -p <photo dir> -o <output file> -z
python PhotoPlanet.py -g test2.gpx -p "E:\Documents and Settings\Jamie\Desktop\Test\test2" -o test2.kmz -z
* Omit the -z switch if you just want a KML file (which link to the photos on your hard drive).
* Open the generated KML/KMZ file in Google Earth and your photos will be added
* An example .kmz file is included so you can see what the output is like
* This script makes use of, and includes, the excellent “EXIF.py”:http://home.cfl.rr.com/genecash/digital_camera/EXIF.py. I didn’t write it.
* The script does NOT write to the photos, so it should be quite safe
* Having said that, I’m not responsible if it doesn’t work or breaks something
The code is reproduced below for information purposes only. You should download “the full archive”:http://jamie.ideasasylum.com/notebook/file_download/7 which includes all the necessary files, a README (mostly this document), and “example .KMZ file”:http://jamie.ideasasylum.com/notebook/file_download/8.