Adding laititude and longitude to camera images

Started by d50034-furious, November 14, 2024, 09:56:53 AM

Previous topic - Next topic

d50034-furious

Hi all, my first post here and I  hope it's in the right place.
I have just updated from Exiftool v3.38 to the current version. Managed to get my head round most of the changes (e.g. not having a commonmetadata.txt file), but I'm stuck at adding lat/long details to my photos. It seems from all my searching that I have to use the Exiftool command line. I found a couple of examples but they don't work.
First one was

exiftool -GPSLatitude=51.570171 -GPSLatitudeRef=N -GPSLongitude=-1.140272 -GPSLongitudeRef=W -GPSAltitude=0 -GPSAltitudeRef="Above Sea Level" "P1010727 - Copy.JPG"

This failed saying that two files couldn't be found (570171 and 140272), which are the decimal parts of the lat/longs. It claimed it had updated one but it hadn't correctly.

The other one was using
exiftool -@ my.args "P1010727 - Copy.JPG"
with the my.args file containing
-gpscoordinates=51°34.2103' N, 1°8.4163 E

That just said   
0 image files updated
1 image files unchanged
Any help would be gratefully received.
Malcolm

Phil Harvey

Hi Malcolm,

Your first command works when I cut and paste it here (Mac Terminal).  How are you running the command (ie. what command shell)?

Your second doesn't work because it should be GPSPosition, not GPSCoordinates.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: d50034-furious on November 14, 2024, 09:56:53 AMI found a couple of examples but they don't work.
First one was

exiftool -GPSLatitude=51.570171 -GPSLatitudeRef=N -GPSLongitude=-1.140272 -GPSLongitudeRef=W -GPSAltitude=0 -GPSAltitudeRef="Above Sea Level" "P1010727 - Copy.JPG"

This failed saying that two files couldn't be found (570171 and 140272), which are the decimal parts of the lat/longs. It claimed it had updated one but it hadn't correctly.

tl;dr Don't use Windows PowerShell. Use CMD instead.

When using PowerShell, you have to pay attention to the highlighting. Notice how the decimal portions are highlighted differently
Clipboard_11-14-2024_01.png

So for some stupid reason, PS thinks the dot is a separator of some sort. This problem doesn't exist with CMD.

Edit: Found this StackOverflow question about the dot and PS.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

d50034-furious

Thanks guys, using CMD did the trick - though I thought CMD is deprecated.

As far as the args file is concerned, I got the conentents from https://exiftool.org/forum/index.php?topic=15562.msg83595#msg83595 (which is one of yours Phil :) . I may well use it after correcting it.

In ExifToolGui I think I can use Workspace but I'm not sure of the tag name to use. I'm looking at using the map as well.
I may well be back with more questions!
Oh and thanks for tidying up my original post as well.
Cheers
Malcolm

FrankB

Quote from: d50034-furious on November 14, 2024, 11:40:02 AMIn ExifToolGui I think I can use Workspace but I'm not sure of the tag name to use. I'm looking at using the map as well.

Sure you can use the GUI Workspace. The tag names to use are not different from the CMD line. You can configure the tags with the Workspace Manager.
https://github.com/FrankBijnen/ExifToolGui/blob/main/Docs/ExifToolGUI_V6.md#m_workspace

Getting started with the map:
https://github.com/FrankBijnen/ExifToolGui/blob/main/Docs/ExifToolGUI_V6.md#osm-map-panel

Still unclear? Post something in the Gui section.

Frank

d50034-furious

Quote from: FrankB on November 14, 2024, 12:02:44 PM
Quote from: d50034-furious on November 14, 2024, 11:40:02 AMIn ExifToolGui I think I can use Workspace but I'm not sure of the tag name to use. I'm looking at using the map as well.

Sure you can use the GUI Workspace. The tag names to use are not different from the CMD line. You can configure the tags with the Workspace Manager.
https://github.com/FrankBijnen/ExifToolGui/blob/main/Docs/ExifToolGUI_V6.md#m_workspace

Getting started with the map:
https://github.com/FrankBijnen/ExifToolGui/blob/main/Docs/ExifToolGUI_V6.md#osm-map-panel

Still unclear? Post something in the Gui section.

Frank
Thanks, I will carefully read those pages