Skip to content

Instantly share code, notes, and snippets.

@snakeye
snakeye / exif_gps.py
Last active July 11, 2024 19:54
Python: get GPS latitude and longitude coordinates from JPEG EXIF using exifread
import exifread
# based on https://gist.github.com/erans/983821
def _get_if_exist(data, key):
if key in data:
return data[key]
return None