main page - page initiale - hauptseite - página principal projects - projets - projekte - proyectos authors - auteurs - autoren - autores papers - exposés - berichte - papeles help - aide - hilfe - ayuda

carto:projects:photoTools:gpsPhoto.pl

gpsPhoto.pl

A commandline tool to synchronize a gps (gpx) tracklog with the date/time stamps of the image exif-data

Please note that gpsPhoto.pl is now a sourceforge project (gps2photo).

This tool can be used under the terms of the GPL license

About | Download | Required Perl Modules | Usage | Supported Image Formats | Software with GPX support | Software with IPTC/EXIF support | ExifTool Tricks | Links and Tutorials | Documentation in Other Languages | Credits | History | Authors/Feedback sourceforge.net

The purpose of this tool is to allow a hiker to record a GPS tracklog or waypoints and later (at home) synchronize this GPS data with the timestamps of the image exif data of his digital camera, in order to locate and store the position where the picture was taken. The tool writes coordinates, altitude and additional metadata to the Exif and IPTC metadata section of jpeg, nef and potentially other file formats. Optionally, a Google Earth kml file is created containing the gps tracklog and the image positions.

The hiker can conveniently store the gps device in the pocket on top of his backpack. The GPS signal should be strong enough to penetrate the fabric of this material. To make sure that the signal gets properly recorded the hiker should check the device from time to time. The setup was tested with a Garmin eTrex vista device but it should work with any device that can export to the gpx (XML based) format. It is important that the gpx file contains the coordinates, and a timestamp. The hiker should check if the GPS clock and the camera clock are synchronized prior to the hike. A timeoffset is, however, allowed and can be considered during data processing at home.

A special advice for garmin users (tested with etrex version): you should not store the tracklog within the device under a separate filename (using the save option). The garmin device will filter the data (delete track points) and strip off the timestamps on saving the tracklog within the file. Just download the current (active) tracklog to the computer in order to preserve the data. The tracklog can then be cleared. The garmin track log setup also allows to set the time interval in which to record the data. The denser the data, the more accurate the matching can potentially be, but the sooner the storage capacity of your device will be used up. For shorter trips or devices with a larger storage capacity you can use a more dense interval.

Program download and prerequisites

As the program is written in perl it should run on any platform. You need however install the required perl modules from www.cpan.org. Windows users can use the ActiveState perl distribution and use the ppm (perl package manager) to install the modules. At a later stage we will provide a binary (.exe) version for the windows platform. Macintosh users can either use the provided perl version that comes with MacOSX or use ActiveStates MacOSX perl distribution.

Software Download

Required additional perl modules not included in the standard distribution:

ActivePerl users may install the perl modules using the "ppm" command. Start → ActivePerl → Perl Package Manager. Type "install module-name". See more information at the aspn.activestate.com/ASPN/docs/ActivePerl/5.8/bin/ppm.html ActiveState ppm documentation page. Windows users who want to manually install the tool should have a look at www.halo-photographs.com/info/PerlExifToolgpsPhoto.html Hans Loepfes instructions. Peter Rukavina provided a ruk.ca/article/3768 blog on some experience with open source GPS tools on MacOSX.

Program Usage

See sourceforge.net/projects/gps2photo/?source=directory

Currently supported image file formats

Potentially, one can add other formats as well, as long as they are supported by Image::ExifTool. If you want to add additional file formats add the extensions in the following line:

if ($ext =~ /^\.(jpg|jpeg|nef|cr2|crw)$/i) {

See also www.sno.phy.queensu.ca/~phil/exiftool/#Supported"

Extract from a sample gpx file

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="https://www.topografix.com/GPX/1/1" creator="MapSource 6.8.0" version="1.1" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.topografix.com/GPX/1/1 https://www.topografix.com/GPX/1/1/gpx.xsd">

  <metadata>
    <link href="https://www.garmin.com">
      <text>Garmin International</text>
    </link>
    <time>2005-10-09T09:13:00Z</time>
    <bounds maxlat="47.420640" maxlon="9.062026" minlat="46.715949" minlon="7.977984"/>
  </metadata>

  <trk>
    <name>ACTIVE LOG</name>
    <trkseg>
      <trkpt lat="46.767876" lon="9.062026">
        <ele>487.525635</ele>
        <time>2005-09-04T18:35:04Z</time>
      </trkpt>
      <trkpt lat="46.767876" lon="9.062026">
        <ele>486.083740</ele>
        <time>2005-09-04T18:35:40Z</time>
      </trkpt>
      <trkpt lat="46.767876" lon="9.062026">
        <ele>487.525635</ele>
        <time>2005-09-04T18:37:42Z</time>
      </trkpt>
      <!-- .... -->
    </trkseg>
  </trk>
</gpx>

Software that is known to export to the gpx tracklog format:

Please tell us if you know additional software!

Software that is known to support reading and writing of IPTC and Exifdata:

Please note that EXIF tags are often read only. Please tell us if you know additional software!

ExifTool Tips and Tricks

See additional information at www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html

Shift Date/Time in Exif data:
exiftool -AllDates+='5:10:2 10:48:0' -overwrite_original *.nef

This shifts all time stamps 5 years, 10 months, 2 days, 10 hours, 48 minutes and 0 seconds.

Manually set photo viewpoint coordinate and target point (GPS coordinates):
exiftool -GPSLatitude=43,22,1.41 -GPSLongitude=8,24,8.56 -GPSLatitudeRef=N -GPSLongitudeRef=W -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -GPSMapDatum=WGS84 -GPSDestLatitude=43,22,2.84 -GPSDestLongitude=8,24,8.65 -GPSDestLongitudeRef=W -GPSDestLatitudeRef=N -overwrite_original yourimage.jpg
View all Image Metadata:
exiftool yourimage.jpg

Links and Tutorials

This section links to other pages, projects and tutorials using gpsPhoto:

Credits

Version history

Authors and Feedback

Provided by Peter Sykora, Andreas Neumann and Dr. Uwe Girlich. Please let the authors know on the sourceforge.net/mail/?group_id=180378 if you have proposals for corrections, useful features or documentation enhancements, sourceforge.net/tracker/?group_id=180378&atid=892944 report bugsor or sourceforge.net/tracker/?group_id=180378&atid=892947 feature requests. If you have a cool project or article that makes use of gpsPhoto, please let us know, thanks!

About | Download | Required Perl Modules | Usage | Supported Image Formats | Software with GPX support | Software with IPTC/EXIF support | ExifTool Tricks | Links and Tutorials | Documentation in Other Languages | Credits | History | Authors/Feedback sourceforge.net



Last modified: Tuesday, 10-Dec-2019 21:49:22 CET
© carto:net (andreas neumann & andré m. winter)
original URL for reference: https://old.carto.net/projects/photoTools/gpsPhoto/index.shtml