CSV file with file name and GPS info + location info for JPG and RAW

Started by mulcamd, September 03, 2013, 01:16:48 PM

Previous topic - Next topic

mulcamd

What I want is a CSV file with:

  • File name
  • GPSLatitude
  • GPS GPSLongitude
  • Country-PrimaryLocationCode
  • Country-PrimaryLocationName
  • Province-State
  • City
  • Sub-location


I thought this would be simple:
"..\Tool\exiftool.exe" -csv -filename -GPSLatitude -GPSLongitude -Country-PrimaryLocationCode -Country-PrimaryLocationName -Province-State -city -Sub-location -c FMT("%%.6f") -n "M:\Foto's\1988\07-08 xxxxxx\JJH_198807-08_0001.JPG" > GPSInfo_dec.csv

Yet this does not work for the RAW files CR2 -> XMP because in JPG I need the fields -EXIF:GPSLatitude and -EXIF:GPSLongitude, yet for XMP I need -XMP:GPSLatitude -XMP:GPSLongitude

Question 1: Is there a generic way to retrieve the GPSLatitude etc for both JPG and RAW files or do I need 2 commands, one for JPG and one for RAW.
I can not mention both in one command, because then I duplicate all columns in my CSV, or ?????
Same question for the location fields like City.
This information can be scattered over IPTC and XMP and sometimes even more locations.

The next problem is that the CSV file should contain the RAW file file name and not the XMP file file name.
I did not find a way to solve this problem
Question 2: How to list the RAW file name when processing the XMP file.

Phil Harvey

1) If you just specify GPSLatitude/GPSLongitude it should work for either EXIF or XMP.  I don't see why you say this doesn't do what you want.

2) You could set the RawFileName in XMP and extract that, but you would need to do something like create a user-defined tag to automatically take the FileName if RawFileName doesn't exist.

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