Exporting GPS Data from a folder of images & writing to a CSV

January 27, 2013

While at #educon @alvintrusty was talking about fusion tables which is a tool from Google that allows you to map and plot data. The conversation came up about attaching GPS data from images into the map. There are several apps for IOS, Windows, and Mac that will allow you to see this data. I wanted to share a quick tip using one of my favorite tools, EXIFTool to pull out the GPS EXIF data from a folder of images.
The goal for this post is to extract Longitude and Latitude data from a folder of images and export the data in a CSV so it can be easily imported into a Fusion Table.

To get started navigate to http://www.sno.phy.queensu.ca/~phil/exiftool/ and download exiftool.

Install the software on your computer.

Once the installation is finished, open up Terminal or open up your Command Line on Windows.

Screen Shot 2013 01 27 at 3 31 34 PM

Here is the line that you need to enter:

“exiftool -csv -filename -imagesize -gps:GPSLatitude -gps:GPSLongitude ./ > long.csv”


This command will go to the folder that you input and read through all of the images and pull out the filename, the image size, the GPS Latitude and the GPS Longitude and export everything to a CSV.

Here is the finished CSV that is opened in Excel:

Screen Shot 2013 01 27 at 3 36 17 PM


If you have any issues feel free to comment or email me at tj@tjhouston.com