Skip to content

Python script that extracts GPS coordinates from image files using EXIF metadata, allowing for location detection.

Notifications You must be signed in to change notification settings

ozgecinko/image-metadata-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image Metadata Extractor

This Python script, named "image_metadata.py", allows you to extract EXIF data, including GPS coordinates, from an image file using the Python Imaging Library (PIL) and the Geopy library. It also includes functions to convert GPS coordinates from degrees, minutes, and seconds format to decimal degrees, and to retrieve the address of the location based on the extracted GPS coordinates using Nominatim geocoding service. The script catches common exceptions, such as IOError, AttributeError, KeyError, and IndexError, and provides error handling. This script can be useful for extracting metadata from images and obtaining location information from GPS coordinates embedded in image EXIF data.

Installation

  • Create and active virtualenv.
    python3 -m venv .env
    source .env/bin/active
    
  • Install dependencies.
    pip install -r requirements.txt
    
  • Run as you wish!

About

Python script that extracts GPS coordinates from image files using EXIF metadata, allowing for location detection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages