Saturday, August 15, 2015

Geotag2kml: python script to create a KML file from geotagged pictures

Sometimes it's not the photo itself that matters, but where the photo was taken.

I needed a tool to parse thousands of geotagged pictures and show them on Google Earth. I wrote a Python script based in part on what was posted years ago in the ExifTool Forum.

My script was written to:
  • parse recursively geotagged pictures
  • create a KML file to show geotagged pictures on Google Earth
  • group and sort GPS data by date
  • show visually for each date where the first geotagged picture was taken. Each first GPS point is indicated by the icon of a small man
  • connect the GPS points of each date with a colored line
  • get the preview of a picture when clicking on a placemark
  • list make and model information of each digital camera used to take and geotag the analyzed photos
  • speed up my analysis ;)

  • Python v2.7
  • Exiftool (rename the executable to "exiftool.exe" and put it in the same folder of the script)
  • Google Earth


Run the script and type the absolute path of the directory containing your pictures. The script will create and save in this path a file named "GoogleEarth.kml".


geotag2kml v0.1

Here are a couple of screenshots.

No comments:

Post a Comment