Creates a Google Earth .KML file from geotagged photos/videos



Blog post:

The is a cross-platform script that uses ExifTool to find geotagged files and parse their metadata. It then creates two different Google Earth .KML files to display the photos/videos found.

The .KML file will be structured this way:

  • GPS points are grouped and sorted by YYYY | YYYY:MM | YYYY:MM:DD;
  • the first GPS point of each date is indicated with an icon different from the other points of the same date;
  • the GPS points occurred on the same date are connected with a colored line;
  • placemark names contain: "Timestamp | Make Model | Filename";
  • when clicking on a placemark icon, the picture preview appears.




How to install each component

#Python3 dependencies

  • pip3 install geopy Pillow randomcolor

#Windows 10 x64

#Ubuntu (last tested with Ubuntu 22.04.1 LTS)

sudo apt install libimage-exiftool-perl -y

sudo apt-get install libheif-examples

#Google Earth
wget -O ~/google-earth.deb && sudo dpkg -i ~/google-earth.deb

#Mac OS (tested with macOS Big Sur 11.0.1)

  • If you're having any issue while installing Pillow, try:
/bin/bash -c "$(curl -fsSL" && brew install libjpeg && pip3 install Pillow --user
brew install imagemagick

How to use the script

Run the script and type the absolute path of the directory to parse. Examples:

  • Microsoft Windows: python3 C:\MyPhotos
  • Ubuntu: python3 /home/username/Desktop/Photos

The output files will be saved under the given path.

Popular Earth Projects
Popular Imagemagick Projects
Popular Mapping Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.