Extract GPS information from Photos using Python

A step by step guide on how to obtain Geographic data coordinates from photos using pillow library in python

Abhijith Chandradas
Geek Culture

--

Modern day digital cameras, mobile phones, laptops etc. stores metadata along with photos when it is taken. This data include EXIF data and other critical information including the GPS data, data related to the device etc.

In this article we will see how to obtain the GPS Information from photos. The only library required for this purpose is pillow. Installing pillow is a prerequisite for the code to work.

Obtain Metadata

The following code can be used to extract metadata from a photo.

This code snippet extracts the metadata from an image-’img.jpg’ and store the data as a dictionary named exif_table.

I have written an article detailing each step in extracting the EXIF data which can be accessed below.

--

--

Abhijith Chandradas
Geek Culture

Data Analyst | Hacker | Financial Analyst | Freelancer | IIM MBA | Opensource | Democratize Knowledge | https://www.youtube.com/channel/UCLpBd4gzfIBXm2BPpdHOWdQ