Wednesday, November 30, 2022

Plot your locations from photos on a map

 First, get location data and save to CSV file as follows:

% exiftool -filename -DateTimeOriginal -gpslatitude -gpslongitude -gpsaltitude -csv -T -r -n <photosdirectory>    > output-all.csv

Where <photosdirectory> is the full path to the photos directory. This will produce a CSV file with location data of each photo, when available. Please note that for some photos exiftool fails to extract the GPS data (see https://exiftool.org/forum/index.php?topic=14228.0)

Then use GPS Visualizer site to plot the data into a map: https://www.gpsvisualizer.com/map_input?form=data
File upload limit is 10MB, so if your file is too heavy, delete path info etc. and leave only GPS long/lat data with file name for example. Remove also lines without long/lat data because the photo does not have it. Using GPS Visualizer you can output as image, Google Maps etc.


Another way is to import the CSV file to Google Maps' My Maps, but there is a limit of 2000 lines per import (per layer), and there is also a limit of layers. With over 50 thousands data for example from my photos, My Maps cannot be used. When using Google Maps' My Maps, you can split the CSV file into 2000 lines using split command on Mac:

% split -l 2000 --numeric-suffixes  output-all.csv file output-all-