Sections: Usage 1: Geo tag a single image | Usage 2: Geo tag all Images in a Directory | Usage 3: Geo tag all Images in a Directory merging multiple tracks | Advanced Usage: | Advanced Usage 1: Add or subtract a time value from your photos before comparing | Advanced Usage 2: Specify a maximum Time Delta | Adv. Usage 3: Fallback to the Image File's Date if there is no Creation Date | Advanced Usage 4: Write the Coordinates to the Image |

Usage of the JPhotoGeoTagger command line utility which manages EXIF headers.

See JPhotoGeoTagger.

Usage 1: Geo tag a single image ^

  java -jar JPhotoGeoTaggerVxyz.jar --JPEG=/home/someuser/someimage.jpeg --GPX=/home/someuser/sometrack.gpx

Usage 2: Geo tag all Images in a Directory ^

  java -jar JPhotoGeoTaggerVxyz.jar --JPEG=/home/someuser/imagedirectory --GPX=/home/someuser/sometrack.gpx

Usage 3: Geo tag all Images in a Directory merging multiple tracks ^

  java -jar JPhotoGeoTaggerVxyz.jar --JPEG=/home/someuser/imagedirectory --GPX=/home/someuser/trackdirectory

You can also combine this behaviour, e.g. use one photo and directory of GPX files.

Advanced Usage: ^

Advanced Usage 1: Add or subtract a time value from your photos before comparing ^

  java -jar JPhotoGeoTaggerVX.Y.Z --JPEG=/home/someuser/imagedirectory --GPX=/home/someuser/sometrack.gpx --TimeShift=-2d4h3m

This is useful if the time set in the camera was not correct while taking your photos. Just calculate the difference to the real time (e.g. by comparing your cameras current time with an accurate watch) and use the --TimeShift parameter to add or subtract the difference from your photos.

You may use the modifiers d, h, m and s to represent a day, hour, minute and second.

Examples:

  --TimeShift=5d3h
  adds 5 days and 3 hours to the time recorded in the photo(s) before comparing.

  --TimeShift=-5d3h
  subtracts 5 days and 3 hours from the time recorded in the photo(s) before comparing.

  --TimeShift=123211
  adds 123211 ms (milliseconds) to the photo before comparing.

  --TimeShift=-123211
  subtracts 123211 ms from the photo before comparing

Advanced Usage 2: Specify a maximum Time Delta ^

  java -jar JPhotoGeoTaggerVX.Y.Z --JPEG=/home/someuser/someimage.jpeg --GPX=/home/someuser/sometrack.gpx --maxTimeDelta=5m

If you want to prevent JPhotoGeoTagger from tagging an image if there is no GPS track point recorded shortly before/after the image was taken, use the --maxTimeDelta parameter. It makes JPhotoGeoTagger only tag an image if there was an track point recorded this long before/after the image was taken. The parameter expects ms (Milliseconds), but you may use the same time modifiers as in the TimeShift parameter (d, h, m...).

Adv. Usage 3: Fallback to the Image File's Date if there is no Creation Date ^

   java -jar JPhotoGeoTaggerVX.Y.Z --JPEG=/home/someuser/someimage.jpeg --GPX=/home/someuser/sometrack.gpx --useModifyTime

Normally, when JPhotoGeoTagger finds no creation date in the Exif Headers, an image does not get tagged. With this option enabled JPhotoGeoTagger uses the modify(!) date of the file instead the missing creation date.

Advanced Usage 4: Write the Coordinates to the Image ^

   java -jar JPhotoGeoTaggerVX.Y.Z --JPEG=/home/someuser/someimage.jpeg --GPX=/home/someuser/sometrack.gpx --writeGPStoImage=true

This writes the GPS coordinates (Lat/Lon/Altitude) to the actual image itself. The default is a white Arial 12 pt. font at the lower right corner.

You can adjust this by using the following parameters:

  --textPosition= <constant>, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT or BOTTOM_RIGHT
  --textFont= <font name> - sets the font, this may be the name of any font on your system, e.g. Arial
  --textSize= <font size> - sets the size of the font, e.g. 12
  --textRed= <number> - sets the red portion of the image; a decimal value between 0 and 255, e.g. 230
  --textGreen= <number> - sets the green portion of the image; a decimal value between 0 and 255, e.g. 230
  --textBlue= <number> - sets the blue portion of the image; a decimal value between 0 and 255, e.g. 230