Author Topic: "-gps:all" doesn't grab all the GPS tags  (Read 469 times)

dcwp

  • Newbie
  • *
  • Posts: 4
"-gps:all" doesn't grab all the GPS tags
« on: May 19, 2018, 05:24:47 PM »
I want to copy all the GPS tags from one image file to another, should just be,

exiftool -tagsfromfile SRCFILE -gps:all DSTFILE -overwrite_original

But -gps:all isn't getting all the GPS tags.

exiftool -gps:all SRCFILE
prints,

Code: [Select]
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 22:43:42
GPS Speed Ref                   : km/h
GPS Speed                       : 0
GPS Img Direction Ref           : True North
GPS Img Direction               : 179.1825397
GPS Dest Bearing Ref            : True North
GPS Dest Bearing                : 179.1825397
GPS Date Stamp                  : 2018:05:04
GPS Horizontal Positioning Error: 5 m

but
exiftool SRCFILE |grep -i gps
prints,

Code: [Select]
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 22:43:42
GPS Speed Ref                   : km/h
GPS Speed                       : 0
GPS Img Direction Ref           : True North
GPS Img Direction               : 179.1825397
GPS Dest Bearing Ref            : True North
GPS Dest Bearing                : 179.1825397
GPS Date Stamp                  : 2018:05:04
GPS Horizontal Positioning Error: 5 m
GPS Altitude                    : 351.3 m Above Sea Level
GPS Date/Time                   : 2018:05:04 22:43:42Z
GPS Latitude                    : 40 deg 28' 31.40" N
GPS Longitude                   : 79 deg 44' 9.55" W
GPS Position                    : 40 deg 28' 31.40" N, 79 deg 44' 9.55" W

I'm a greedy pig and want GPSLatitudeRef, GPSLongitudeRef, etc.  Am I maybe misunderstanding tag groups?  According to

exiftool -g SRCFILE |grep "\-\-\-\-"

there is no "GPS" tag group.

exiftool -g SRCFILE > tmp.txt
shows the EXIF tag group containing the tags,

Code: [Select]
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 22:43:42
GPS Speed Ref                   : km/h
GPS Speed                       : 0
GPS Img Direction Ref           : True North
GPS Img Direction               : 179.1825397
GPS Dest Bearing Ref            : True North
GPS Dest Bearing                : 179.1825397
GPS Date Stamp                  : 2018:05:04
GPS Horizontal Positioning Error: 5 m

and the Composite tag group holding the tags,

Code: [Select]
GPS Altitude                    : 351.3 m Above Sea Level
GPS Date/Time                   : 2018:05:04 22:43:42Z
GPS Latitude                    : 40 deg 28' 31.40" N
GPS Longitude                   : 79 deg 44' 9.55" W
GPS Position                    : 40 deg 28' 31.40" N, 79 deg 44' 9.55" W

I could do something horrifically ugly, a script containing a series of commands,

exiftool -tagfromfile "%1" -GPSLatitudeRef "%2" -overwrite_original
exiftool -tagfromfile "%1" -GPSLongitudeRef "%2" -overwrite_original
exiftool -tagfromfile "%1" -GPSAltitudeRef "%2" -overwrite_original
...
exiftool -tagfromfile "%1" -GPSPosition "%2" -overwrite_original


but I really don't want to resort to this.  I figure I'm just missing, or misunderstanding, something about tag groups.


David.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14759
    • ExifTool Home Page
Re: "-gps:all" doesn't grab all the GPS tags
« Reply #1 on: May 19, 2018, 07:29:39 PM »
But -gps:all isn't getting all the GPS tags.

exiftool -gps:all SRCFILE

Hi David,

There are two things at work here.

1. Some of the "GPS" tags you are looking at are actually Composite tags, not GPS.  Use this command to see them all with their group names:

exiftool -a -G1 "-gps*" FILE

...but reading further in your post I see you have figured this out.

2. Some GPS tags may be hidden in your command.  See FAQ 3.

The bottom line is that this command should copy all tags in the GPS group:

exiftool -tagsfromfile SRCFILE -gps:all DSTFILE

Which is what you did, and should be what you wanted.

- Phil

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