Insert GPS coordinates (lat/long/altitude) to batch of pictures using excel info

Started by kempo, May 12, 2014, 04:28:09 PM

Previous topic - Next topic

Amrit

Hi Phil

Manage to get it work Source file as below 
SourceFile,GPSLatitude,GPSLongitude
C:\Users\raj_am\Desktop\Images\P7270104.jpg,18.156476,178.447978

Thanks again

vlad_rostov

Sorry for necroposting, but i can't get it to work.
Tried adding "./" to filenames in source file and specifying the full path to images as Amrit done (also in lower case) - but nothing worked.
I'm using ExifTool ver 12.01 on Win 10 Home.
Please find command line output attached and first few lines of coords.txt below^
SourceFile,GPSLongitude,GPSLatitude,GPSAltitude,Accuracy_X/Y_(m),Accuracy_Z_(m),X_est,Y_est,Z_est
c:\users\asus\desktop\28\kriv\dsc00598.jpg,42.715884,47.752518,179.996000,0.020000,0.021000,,,
c:\users\asus\desktop\28\kriv\dsc00599.jpg,42.715862,47.752531,179.387000,0.020000,0.020000,,,
c:\users\asus\desktop\28\kriv\dsc00600.jpg,42.715797,47.752545,179.109000,0.020000,0.020000,,,
c:\users\asus\desktop\28\kriv\dsc00601.jpg,42.715691,47.752554,179.041000,0.020000,0.020000,,,
c:\users\asus\desktop\28\kriv\dsc00602.jpg,42.715510,47.752570,178.844000,0.020000,0.020000,42.715509,47.752571,178.843539
c:\users\asus\desktop\28\kriv\dsc00603.jpg,42.715199,47.752597,179.148000,0.020000,0.019000,42.715200,47.752597,179.140831
c:\users\asus\desktop\28\kriv\dsc00604.jpg,42.714839,47.752626,179.816000,0.021000,0.020000,42.714840,47.752627,180.140705
c:\users\asus\desktop\28\kriv\dsc00605.jpg,42.714517,47.752652,180.129000,0.021000,0.020000,42.714518,47.752652,180.209676
c:\users\asus\desktop\28\kriv\dsc00606.jpg,42.714198,47.752678,180.390000,0.021000,0.020000,42.714198,47.752678,180.330282

Phil Harvey

Hi Vlad,

Try changing the backslashes in the CSV SourceFile column to forward slashes.

- 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 ($).

vlad_rostov

Thank you, Phil. It worked like a charm

--
Best regards,
Vlad

Quote from: Phil Harvey on September 11, 2020, 09:29:53 AM
Hi Vlad,

Try changing the backslashes in the CSV SourceFile column to forward slashes.

- Phil

vlad_rostov

Quote from: vlad_rostov on September 11, 2020, 10:08:05 AM
It worked like a charm

I was wrong. I saw no errors in cmd output and saw that new jpgs were created and original ones backed up. But in fact only GPS references were written, but not the coordinates.
And I can't reproduce this result on either of two Win 10 machines I have in office at the moment. Now I get only the same result as posted previously.

Phil Harvey

You should pay attention to the ExifTool error messages.  I get this when I try your CSV file:

Invalid tag name 'Accuracy_X/Y_(m)' in CSV file

Try removing the columns in the CSV which give errors like this.

- 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 ($).

vlad_rostov

Quote from: Phil Harvey on September 15, 2020, 10:43:02 AM
Try removing the columns in the CSV which give errors like this.

It was the point, thank you, Phil. At first I noticed this error, but later forgot to try removing columns. Sorry, I shouldn't beat the rush.

--
Best regards,
Vlad

StarGeek

The main problem was the parenthesis and the slash.  Without those, exiftool would have simply ignored those columns because they would have been non-existent tag names.  At least that's what my quick test showed.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

...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 ($).

vlad_rostov

Quote from: StarGeek on September 16, 2020, 12:17:28 PM
The main problem was the parenthesis and the slash.  Without those, exiftool would have simply ignored those columns because they would have been non-existent tag names.  At least that's what my quick test showed.

Yes, it works that way, too. Thanks for clarification.

--
Best regards,
Vlad