How to add GPS tags to your photos using ExifTool

  1. Find the spot on the map and get the coordinates.
    The first number is the latitude which specifies the north-south position.
    The second number is the longitude which specifies the east-west position.

    • http://maps.google.com/
      Click the spot and you will find the latitude and longitude in the URL as well as in a popup notification dialog:
      screenshot_20181219_090526
      https://www.google.com/maps/@28.3052659,-16.840323,359m/data=!3m1!1e3
    • https://www.openstreetmap.org/
      Double-click the spot - the map will center on that area, and then you have the right coordinates in the URL:
      https://www.openstreetmap.org/#map=19/28.30539/-16.83983
  2. Tag your photo:
    You need to set the following tags:

    exiftool -overwrite_original -GPSLatitudeRef=N -GPSLatitude=28.30539 -GPSLongitudeRef=W -GPSLongitude=-16.83983 photo.jpg
    
4 Likes

Or use the map module in darktable:
https://www.darktable.org/usermanual/en/map_chapter.html

1 Like

I am trying to add GPS tags from a gpx file.
I am using Ubuntu. This works:
exiftool -geotag "/media/macgyver/4GB/krypterat/decrypt/*.gpx" /media/macgyver/4GB/krypterat/decrypt

This doesn’t work:
exiftool -geotag "*.gpx" dir

This does work:
exiftool -geotag "*.gpx" /media/macgyver/4GB/krypterat/decrypt

How come I can’t use dir to simplify things?

Seems the easiest thing is to use exiftool -geotag "*.gpx" *CR2
Problem solved.

Why not use geosetter? It uses EXIFtool internally but makes life easier.

Hermann-Josef

Isn’t that windows only?

Yes, it is Windows only.

Didn’t know about it. I normally use darktable when adding GPS tags, but I wanted to add the tags into the raw files instead of just the XMP files if I ever would need to change software.
Seems also like the raw files from 1Ds, TIF files, don’t have a GPS tag to change at all.

Note that darktable stores the XMP data for geolocation in a standard XMP tag, so other applications that understand XMP should be able to read it

I use digikam for that. It has built-in map and ability to copy and paste coordinates.
I also use Reverse Geocodding there which will convert GPS coordinates into location names and add them as tags