No SourceFile '' in imported CSV database

Started by michaelroach, September 09, 2020, 03:17:26 AM

Previous topic - Next topic

michaelroach

Hi,
I have several hundred images that I want to geocode and I have the coordinates for these images in a text file.

I tried to follow the instructions provided in: https://www.propelleraero.com/blog/how-to-batch-geotag-drone-survey-photos-with-exiftool/  and I set up a csv file with all the fields that are apparently required....

I then ran the command line exiftool command:

C:\AAA>exiftool -GPSLatitude -GPSLongitude -GPSAltitude -GPSLatitudeRef -GPSLongitudeRef -GPSAltitudeRef -csv=test.csv -v2 -o ./georef

Exiftool appears to read the data in the csv file because it reports the names and paths to each of the filenames in the first field of the file as shown in the data copied from the command window below:

Imported entry for 'Rossarden13.jpg' (full path: 'c:/aaa/rossarden13.jpg')
Imported entry for 'Rossarden21.jpg' (full path: 'c:/aaa/rossarden21.jpg')
Imported entry for 'Rossarden58.jpg' (full path: 'c:/aaa/rossarden58.jpg')
Imported entry for 'Rossarden37.jpg' (full path: 'c:/aaa/rossarden37.jpg')
Imported entry for 'Rossarden65.jpg' (full path: 'c:/aaa/rossarden65.jpg')
Imported entry for 'Rossarden1.jpg' (full path: 'c:/aaa/rossarden1.jpg')
Imported entry for 'Rossarden46.jpg' (full path: 'c:/aaa/rossarden46.jpg')
Imported entry for 'Rossarden69.jpg' (full path: 'c:/aaa/rossarden69.jpg')
Imported entry for 'Rossarden40.jpg' (full path: 'c:/aaa/rossarden40.jpg')
========
No SourceFile '' in imported CSV database


After listing all the files exiftool then gives the error: No SourceFile '' in imported CSV database

I assumed that there must be an issue with my csv file but I have looked closely at it and cannot find any blank lines or special characters that might be causing this issue.

A dump of the first few lines of the csv file is below:

SourceFile,gpslatitude,gpslongitude,gpsaltitude,gpslatituderef,gpslongituderef,gpsaltituderef
Rossarden1.jpg,41.713457,147.702682,400,S,E,above sea level
Rossarden2.jpg,41.713304,147.702609,400,S,E,above sea level
Rossarden3.jpg,41.71324,147.702896,400,S,E,above sea level
Rossarden4.jpg,41.713059,147.702882,400,S,E,above sea level


I have tried capitalising some of the field names in the csv eg: GPSLatitude but this has no effect.

The files all appear to be in the directory with the csv file and extool as illustrated in the partial listing below. I have tried to reduce the number of entries in the csv file to only one file that I know is in the directory but I still get the same error.

Volume in drive C is OSDisk
Volume Serial Number is 12F0-3BA9

Directory of C:\AAA

09/09/2020  04:44 PM    <DIR>          .
09/09/2020  04:44 PM    <DIR>          ..
28/08/2020  04:44 PM         8,749,130 exiftool.exe
28/08/2020  04:13 PM        13,532,496 Rossarden1.jpg
26/08/2020  09:07 PM        13,160,167 Rossarden2.jpg
26/08/2020  09:09 PM        11,416,346 Rossarden3.jpg
26/08/2020  09:09 PM        12,789,121 Rossarden4.jpg


I am very confused and I guess that there must be something simple that I am missing???
Any suggestions gratefully received.

Regards

Michael

StarGeek

Quote from: michaelroach on September 09, 2020, 03:17:26 AM
I tried to follow the instructions provided in: https://www.propelleraero.com/blog/how-to-batch-geotag-drone-survey-photos-with-exiftool/  and I set up a csv file with all the fields that are apparently required....

I then ran the command line exiftool command:

C:\AAA>exiftool -GPSLatitude -GPSLongitude -GPSAltitude -GPSLatitudeRef -GPSLongitudeRef -GPSAltitudeRef -csv=test.csv -v2 -o ./georef

Most of that command is unnecessary.  None of those gps* arguments are needed as the -csv option uses the tag names from the csv file.  And the -v (verbose) option isn't needed unless you want to see a lot more output, which can be confusing and overwhelming.

The main thing you are missing is the fact that you haven't given exiftool a directory or filename to process.  Exiftool reads in the filenames from the CSV file, but that is just used to match data to the correct file.  You still have to give it files or directories to process.

So try this.
CD to the C:\AAA directory.
Then run this command (a dot at the end to indicate the current directory)
exiftool -csv=test.csv -o ./georef .
This will check every file in C:\AAA to see if there is a match in the CSV file. If there is, it will create a new copy of the file (due to the -o (Outfile) option) in the ./georef directory with the data from the csv file.  The original files will remain unaltered.
* 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).

michaelroach

Thanks StarGeek,

That worked perfectly - all done.

Michael

sarcha

#3
Hey StarGeek,

I was having the same issue and I ran
(base) C:\AAA>exiftool -csv=ExtractMeta.csv -o ./georef .

but still I am getting the following error


Invalid tag name '[Main]          ExifToolVersion                 : 12.33' in CSV file
No SourceFile './C0008.MP4' in imported CSV database
(full path: 'c:/AAA/c0008.mp4')
No SourceFile './frame0.jpg' in imported CSV database
(full path: 'c:/AAA/frame0.jpg')
No SourceFile './frame1.jpg' in imported CSV database
(full path: 'c:AAA/frame1.jpg')
No SourceFile './frame10.jpg' in imported CSV database
(full path: 'c:/AAA/frame10.jpg')
No SourceFile './frame2.jpg' in imported CSV database
(full path: 'c:/AAA/frame2.jpg')
No SourceFile './frame3.jpg' in imported CSV database
(full path: 'c:/AAA/frame3.jpg')
No SourceFile './frame4.jpg' in imported CSV database
(full path: 'c:/AAA/frame4.jpg')
No SourceFile './frame5.jpg' in imported CSV database
(full path: 'c:/AAA/frame5.jpg')
No SourceFile './frame6.jpg' in imported CSV database
(full path: 'c:/AAA/frame6.jpg')
No SourceFile './frame7.jpg' in imported CSV database
(full path: 'c:/AAA/frame7.jpg')
No SourceFile './frame8.jpg' in imported CSV database
(full path: 'c:/AAA/frame8.jpg')
No SourceFile './frame9.jpg' in imported CSV database
(full path: 'c:/AAA/frame9.jpg')
    1 directories scanned
    0 image files read



Can you please suggest what mistake I am doing and how can I rectify it?

Regards
Sarang

SG edit: changed color output to [code][/code], see text below the post window

StarGeek

#4
Check the paths exiftool displays to make sure the files are there.  For some reason, exiftool can't find the files.   Add the -v2 option to see exactly what exiftool is trying to do.  Post the output for that up to the first file (clip the part from frame0.jpg on).

edit:  Also, please do not double post.
* 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).