Nowadays a lot of images contain GPS data. This data are useful in order to remember the exact position where a photo was taken. Those data are used by social networks to suggest you a location for your image.
GPS data can be very useful also during a digital investigation, because they can give you a lot of information about the place where the picture was shoot.
With imago https://github.com/redaelli/imago-forensics (a python tool that I made) extracting GPS data from JPEG can be very easy and fast.
First of all you need to install imago as it is explained on the github page of the program, I suggest you to use pip.
Once imago is installed just run this command:
$ imago -i exif-samples/jpg/gps/ -g
-i is the flag for the input directory with jpeg images -g is the flag for extracting GPS data
If you don’t have images with GPS data you can download them from the internet (just google it). For this example I used the images from exif-sample github repository.
After imago is launched you will see an output that show the progression of the extraction like the one in the image below:
When imago will finish to extract data from the files you will find in the directory where you execute it a csv file (imago.csv) with all the information related to the images and to GPS.
The most important columns of the generated CSV file are Parsed_GPS_Latitude and Parsed_GPS_Longitude that are latitude and longitude expressed in degrees.
In the table below, created from imago.csv, there are the geo-coordinates extracted from the “exif-samples” github repository.
With these coordinates is simple to plot the points where the images were taken on a map, like in the example below.
Imago will also try to translate coordinates into readable information like city, nation, zip code… If this operation is possible you will also find in the generated CSV some other columns with this data.
For example for the image DSCN0021.jpg is possible to retrieve these additional information:
- city: Arezzo
- residential: Arezzo
- county: AR
- suburb: La Torre
- state: Tos
- postcode: 52100
- country_code: it
- country: Italia
- pedestrian: Piazza del Duomo
- place_of_worship: Duomo di Arezzo
Please write in the comment if you have any questions regarding imago or GPS data extraction.