Skip to content

Instantly share code, notes, and snippets.

@andrewbattista
Created July 13, 2020 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewbattista/17398675170cb99b53935abeff29b71d to your computer and use it in GitHub Desktop.
Save andrewbattista/17398675170cb99b53935abeff29b71d to your computer and use it in GitHub Desktop.
Recursive extraction of coordinates from .JPG files

Use grep to strip out elements from photo metadata

If you have a bunch of .jpg photos in a directory that were taken with a camera with coordinates associated, this workflow will allow you to recursively get the coordinates.

First, install exiftool Then, from the directory where all of the .JPGs are

exiftool /Users/andrewbattista/desktop/*.JPG |grep 'File Name\|GPS Latitude\|GPS Longitude'

Then, you will want to print it out to a text file

exiftool /Users/andrewbattista/desktop/*.JPG |grep 'File Name\|GPS Latitude\|GPS Longitude' > /Users/andrewbattista/downloads/photometadata.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment