Code Monkey home page Code Monkey logo

gps2exif's Introduction

gps2exif - GPS-tagging of JPEG files

gps2exif reads .gpx files and tags JPEG images according to the time they have been taken. It allows to fix image date/time and interpolates between GPS points.

General syntax

 gps2exif [-h] [-n] [-v] [--gpx GPX]
 [--ref-img REF_IMAGE] [--ref-time REF_TIME]
 [--shift-time SHIFT_TIME] [--max-dist MTRS] [--max-span SECS]
 [--ok-dist MTRS] [--ok-span SECS] IMAGE [IMAGE ...]

You can give multiple .gpx files using the --gpx FILE switch multiple times. Give the names of the image files to be processed at the end of the command line. The switch -n will make a dry-run and not change any file. The -v switch increases verbosity.

Fixing image date/time

A precise date/time stored in the image's EXIF data is crucial for associating the GPS track with the image. gps2exif offers two ways to fix the date/time stored in the JPEG files before looking up the GPS coordinates:

  • You can either give the name of a file and the correct date/time of the file. gps2exif will calculate the time offset and apply it to all given images. This is ideal if you took a photo of your GPS device showing GPS time.

    The syntax is --ref-img REF_IMAGE --ref-time REF_TIME. REF_TIME should be formatted like 2011-10-22 14:42:07.

  • If you know the time offset, you can give it via --shift-time SHIFT_TIME. For example, use --shift-time=+1:09 to add 1 minute, 9 seconds to the time of each image.

Setting thresholds

Under some circumstances GPS devices do not store enough points to make a precise-enough guess about the location a photo was taken at. You can set the thresholds that control whether the GPS data is deemed good enough or not.

The thresholds are checked on the two GPS points around the time your photo was taken: the last GPS point before and the first GPS point after the time of your photo. You can set thresholds on the time span and the distance between these two GPS points.

With --max-dist MTRS and --max-span SECS you set hard thresholds. A photo will not be GPS-tagged if the two enclosing GPS points are more than MTRS meters or more than SECS seconds apart.

With --ok-dist MTRS and --ok-span SECS you set the okay criteria. A photo will not be GPS-tagged if the two GPS enclosing points are neither closer than MTRS meters nor closer than SECS seconds.

A photo will only be GPS-tagged if both max criteria and at least one ok criterion is met.

gps2exif's People

Contributors

friebel avatar

Stargazers

Brent Maxwell avatar  avatar JT5D avatar Tim Patterson avatar

Watchers

Thomas Friebel avatar

Forkers

a8 chatfeed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.