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

kempo

Hello,

I have found since couple of days the forum , I have read a lot of topics ( but it seems that not enough) but I cannot solve my issue.

Here are the information:

- on a folder I have a lot of pictures (300+);
- on an excel file I have for each picture the following columns : latitude, longitude, altitude (example attached); the excel file is in the same folder as the pictures.

It is possible to attach automatically on each of the picture from the folder the corresponding information from the excel file ?

If is possible, can you please guide me with the necessary steps?

Thank you.

Phil Harvey

Did you read this thread?

I think it describes exactly what you are trying to do.  Just export your excel file in CSV format, then follow the steps in the thread.

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

kempo

Quote from: Phil Harvey on May 13, 2014, 07:24:50 AM
Did you read this thread?

I think it describes exactly what you are trying to do.  Just export your excel file in CSV format, then follow the steps in the thread.

- Phil

Hi Phil,

I have just tried and here are the observations:

- as iLuna said, to have the right results I have added on the txt file, in front of each line "./" (ExifTool v 9.60) ;

- taking into consideration that I have for each picture the coordinates ( longitude, latitude, altitude) is possible to generate a KML file with small placemarks for each picture ?

Thank you for your help,
Alex

Phil Harvey

Hi Alex,

With ExifTool 9.60 the "./" should no longer be necessary.  Please tell me if you found it otherwise.

You can create a KML file from the images once they have been geotagged.  See this section of the geotagging page for details.

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

kempo

Quote from: Phil Harvey on May 14, 2014, 07:34:57 PM
Hi Alex,

With ExifTool 9.60 the "./" should no longer be necessary.  Please tell me if you found it otherwise.


I can confirm that, with 9.60, is necessary to have "./" in front of each line to work - please check the txt file attached on the previous post.

Quote from: Phil Harvey on May 14, 2014, 07:34:57 PM
You can create a KML file from the images once they have been geotagged.  See this section of the geotagging page for details.


Sorry Phil, but i'm lost....

I have all the pictures ( already gps tagged) in c:\images\tag , I must open a cmd.exe window and what next ?

Thank you,
Alex

Phil Harvey

Quote from: kempo on May 15, 2014, 02:26:43 PM
I can confirm that, with 9.60, is necessary to have "./" in front of each line to work - please check the txt file attached on the previous post.

Darn.  I'll see if I can duplicate this the next time I drag the Windows machine out of the closet.

QuoteI have all the pictures ( already gps tagged) in c:\images\tag , I must open a cmd.exe window and what next ?

1. Download and expand the full exiftool distribution and copy fmt_files/kml.fmt to c:\images\tag.  If you can't do that, then copy the kml.fmt file from the link I posted and paste it into a text file called c:\images\tag\kml.fmt.

2. open cmd.exe and type these two commands:

cd c:\images\tag

exiftool -p kml.fmt . > out.kml

There should now be a file called "out.kml" in c:\images\tag.  This is the KML file from your images.

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

Phil Harvey

Quote from: kempo on May 15, 2014, 02:26:43 PM
I can confirm that, with 9.60, is necessary to have "./" in front of each line to work - please check the txt file attached on the previous post.

I finally dragged out the Windows machine to test this.  I removed the "./" from the filenames in your file and all of these commands worked fine for me:

exiftool -csv=position_data.txt IMG_7220.JPG
exiftool -csv=position_data.txt ./IMG_7220.JPG
exiftool -csv=position_data.txt .

Where position_data.txt and IMG_7220.JPG where both in the current directory.

Could you please give me details about the command you used when this didn't work for you?

Thanks.

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

kempo

Hi Phis, sorry for the late response.

I have used these steps:

Quote from: Phil Harvey on May 05, 2014, 07:40:56 AM
Here are the steps:

1) Install ExifTool for command-line use.

2) Change the first line of your .txt file to this:

SourceFile,GPSLatitude,GPSLongitude,GPSAltitude,GPSRoll,GPSPitch,GPSTrack

3) Put the .txt file in C:\Users\m\Desktop\images with your images.

4) Open a cmd.exe window and type "cd c:\Users\m\Desktop\images" (without the quotes), then press RETURN.

5) Type this command, then press RETURN in the cmd window:

exiftool -csv=position_data.txt -gpslatituderef=N -gpslongituderef=W -gpsaltituderef=above -gpstrackref=T .

(don't forget the " .")

All done.

This will write everything but the Roll and Pitch, which aren't standard GPS tags.  To write non-standard GPS Roll and Pitch, install the sample config file from the full distribution.

- Phil

I can make a video capture screen if you want.

Also I have tried the KML "creation" and it is working :


The pictures are "grounded". It is possible to be at the altitude specified in the exif of each picture ? Something like here:



Thank you,
Alex


Phil Harvey

Hi Alex,

And did you confirm you are running the current version?  To do this, type "exiftool -ver" in your cmd.exe window.

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

kempo

Phil , I have made a small video :

https://www.youtube.com/watch?v=ll1lUqW1gyY

Phil Harvey

Hi Alex,

Thanks for this.  It looks like you were doing everything correctly.  Since I can't reproduce this problem, I will add some extra verbose output to ExifTool 9.62 which may allow me to debug the problem with your help.

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

kempo

Quote from: Phil Harvey on May 20, 2014, 02:20:09 PM
Hi Alex,

Thanks for this.  It looks like you were doing everything correctly.  Since I can't reproduce this problem, I will add some extra verbose output to ExifTool 9.62 which may allow me to debug the problem with your help.

- Phil

Phil, just let me know when v 9.62 is available and I will do some trials.

Phil Harvey

Hi Alex,

Great, thanks.  I'll post here when it is available.  Probably Saturday.

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

Phil Harvey

Hi Alex,

ExifTool 9.62 is now available.

With the -v2 option it will now list the full path for each SourceFile entry in the CSV database, and for each file without a corresponding SourceFile.  These full paths should match even if you don't have a "./" before the SourceFile name, but for some reason they don't on your system.  Please try this for one of the files where you get the "No SourceFile" error, and tell me what the -v2 output shows.

Thanks.

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

kempo

Quote from: Phil Harvey on May 24, 2014, 07:27:33 AM
Hi Alex,

ExifTool 9.62 is now available.

With the -v2 option it will now list the full path for each SourceFile entry in the CSV database, and for each file without a corresponding SourceFile.  These full paths should match even if you don't have a "./" before the SourceFile name, but for some reason they don't on your system.  Please try this for one of the files where you get the "No SourceFile" error, and tell me what the -v2 output shows.

Thanks.

- Phil

Hi Phil,

Using v 9.62 here is the message that I receive:



Maybe I'm doing something wrong but I don't know what...