---
title: "Extract GPS Latitude and Longitude Data from EXIF using Python Imaging Library (PIL)"
description: "<p>I was searching an example of using Python Imaging Library (PIL) to extract the GPS data from EXIF data in images.</p>
<p>There were various half baked examples that didn’t handle things well, so I baked something of my own combining multiple examples.</p>
<p>You can get it here: <a href="https://gist.github.com/983821">https://gist.github.com/983821</a></p>
<p>Or see it embedded below:</p>"
doc_version: "1"
last_updated: "2017-06-02"
date: 2011-05-20
tags: [Code, extraction, gps, latitude, longitude, pil, Python]
canonical: "https://eran.sandler.co.il/2011/05/20/extract-gps-latitude-and-longitude-data-from-exif-using-python-imaging-library-pil/"
---

## Sitemap

- [Home](https://eran.sandler.co.il/)

I was searching an example of using Python Imaging Library (PIL) to extract the GPS data from EXIF data in images. 

There were various half baked examples that didn&#8217;t handle things well, so I baked something of my own combining multiple examples.

You can get it here: <https://gist.github.com/983821>

Or see it embedded below: