EXIF GPS tags only group-listed with composite group hidden or JSON format

Started by Andi, June 21, 2022, 05:30:51 PM

Previous topic - Next topic

Andi

I use a Canon PowerShot G7 X Mark II along with the Canon App on my Android phone for GPS tagging. This works quite well, but EXIF tool only seems to show a subset of GPS tags while the Composite groups shows full information.

exiftool -n -G IMG_1892.CR2
[ExifTool]      ExifTool Version Number         : 12.30
[File]          File Name                       : IMG_1892.CR2
...
[File]          File Size                       : 28181774
[File]          File Modification Date/Time     : 2022:06:20 12:11:10+02:00
[File]          File Access Date/Time           : 2022:06:21 23:12:49+02:00
[File]          File Inode Change Date/Time     : 2022:06:21 22:59:29+02:00
[File]          File Permissions                : 100777
[File]          File Type                       : CR2
[File]          File Type Extension             : CR2
[File]          MIME Type                       : image/x-canon-cr2
[File]          Exif Byte Order                 : II
[EXIF]          Image Width                     : 5472
[EXIF]          Image Height                    : 3648
[EXIF]          Bits Per Sample                 : 8 8 8
[EXIF]          Compression                     : 6
[EXIF]          Image Description               :
[EXIF]          Make                            : Canon
[EXIF]          Camera Model Name               : Canon PowerShot G7 X Mark II
[EXIF]          Preview Image Start             : 73728
[EXIF]          Orientation                     : 8
[EXIF]          Preview Image Length            : 4843793
[EXIF]          X Resolution                    : 180
[EXIF]          Y Resolution                    : 180
[EXIF]          Resolution Unit                 : 2
[EXIF]          Modify Date                     : 2022:06:20 12:11:10
...
...
[EXIF]          GPS Version ID                  : 2 3 0 0
[EXIF]          GPS Latitude Ref                : N
[EXIF]          GPS Longitude Ref               : E
[EXIF]          GPS Altitude Ref                : 0
[EXIF]          GPS Time Stamp                  : 10:08:05
[EXIF]          GPS Status                      : A
[EXIF]          GPS Map Datum                   : WGS-84
[EXIF]          GPS Date Stamp                  : 2022:06:20
...
[MakerNotes]    Macro Mode                      : 2
...
[Composite]     Drive Mode                      : 2
[Composite]     Lens                            : 8.8
[Composite]     Shooting Mode                   : 3
[Composite]     WB RGGB Levels                  : 2421 1024 1024 1619
[Composite]     Aperture                        : 2.5
[Composite]     Blue Balance                    : 1.5810546875
[Composite]     Image Size                      : 5472 3648
[Composite]     Lens ID                         : 65535
[Composite]     Megapixels                      : 19.961856
[Composite]     Red Balance                     : 2.3642578125
[Composite]     Scale Factor To 35 mm Equivalent: 2.74062100490487
[Composite]     Shutter Speed                   : 0.0005
[Composite]     Create Date                     : 2022:06:20 12:11:10.94
[Composite]     Date/Time Original              : 2022:06:20 12:11:10.94
[Composite]     Modify Date                     : 2022:06:20 12:11:10.94
[Composite]     GPS Altitude                    : 188.8
[Composite]     GPS Date/Time                   : 2022:06:20 10:08:05Z
[Composite]     GPS Latitude                    : 49.4577761111111
[Composite]     GPS Longitude                   : 8.38771111111111
[Composite]     Lens                            : 24.1174648431629
[Composite]     Circle Of Confusion             : 0.0109633037822789
[Composite]     Depth Of Field                  : 2.67293977879573 5.13162282221703
[Composite]     Field Of View                   : 41.2638312138323
[Composite]     Focal Length                    : 47.8073928095606
[Composite]     GPS Position                    : 49.4577761111111 8.38771111111111
[Composite]     Hyperfocal Distance             : 11.1022422453297
[Composite]     Light Value                     : 12.2877123795495


As you see, Latitude and Longitude are missing within EXIF.

Adding -e to omit the composite group:

exiftool -n -G -e IMG_1892.CR2
[ExifTool]      ExifTool Version Number         : 12.30
[File]          File Name                       : IMG_1892.CR2
[File]          Directory                       : /Users/andi/Pictures/eigene/chronologisch/2022/2022-06-20
[File]          File Size                       : 28181774
[File]          File Modification Date/Time     : 2022:06:20 12:11:10+02:00
[File]          File Access Date/Time           : 2022:06:21 23:27:57+02:00
[File]          File Inode Change Date/Time     : 2022:06:21 22:59:29+02:00
[File]          File Permissions                : 100777
[File]          File Type                       : CR2
[File]          File Type Extension             : CR2
[File]          MIME Type                       : image/x-canon-cr2
[File]          Exif Byte Order                 : II
[EXIF]          Image Width                     : 5472
[EXIF]          Image Height                    : 3648
[EXIF]          Bits Per Sample                 : 8 8 8
[EXIF]          Compression                     : 6
[EXIF]          Image Description               :
[EXIF]          Make                            : Canon
[EXIF]          Camera Model Name               : Canon PowerShot G7 X Mark II
[EXIF]          Preview Image Start             : 73728
[EXIF]          Orientation                     : 8
[EXIF]          Preview Image Length            : 4843793
[EXIF]          X Resolution                    : 180
[EXIF]          Y Resolution                    : 180
[EXIF]          Resolution Unit                 : 2
[EXIF]          Modify Date                     : 2022:06:20 12:11:10
...
...
[EXIF]          Exif Version                    : 0230
...
[EXIF]          GPS Version ID                  : 2 3 0 0
[EXIF]          GPS Latitude Ref                : N
[EXIF]          GPS Latitude                    : 49.4577761111111
[EXIF]          GPS Longitude Ref               : E
[EXIF]          GPS Longitude                   : 8.38771111111111
[EXIF]          GPS Altitude Ref                : 0
[EXIF]          GPS Altitude                    : 188.8
[EXIF]          GPS Time Stamp                  : 10:08:05
[EXIF]          GPS Status                      : A
[EXIF]          GPS Map Datum                   : WGS-84
[EXIF]          GPS Date Stamp                  : 2022:06:20
...
[MakerNotes]    Macro Mode                      : 2
...


Adding -j to output seems to solve the problem, but due to -G I would expect all EXIF tags to be listed no matter which format I output.

StarGeek

From FAQ #3

When duplicate tags exist, only one is extracted unless the -a option is used. Beware that options like -EXIF:all select all EXIF tags from the extracted tags, so EXIF tags hidden by duplicate tags in other locations will not appear in the output for -EXIF:all. For example, the command

exiftool -gps:all image.jpg

will NOT necessarily extract all EXIF GPS tags because some may have been suppressed by same-named tags in other groups. To be sure all EXIF GPS tags are extracted, the -a option must be used:

exiftool -a -gps:all image.jpg

Without the -a (-duplicates) option, a tag will be filled by the value of the last duplicate tag read.  Composite tags are created last, so they will always be the extracted tag when -a isn't used.

When you add the -e (--composite) option, the Composite GPS tags are not generated, so the last tag extracted will be the EXIF ones.  If you had XMP GPS tags in the file, the output might be different yet again.
* 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).

Andi

Thank you for your elaborate reply!

Is there any use in this logic? For me this feels almost like a bug considering 1) the use of -G and 2) that with JSON export all tags are listed ignoring no matter if I use -e or -a.

StarGeek

Quote from: Andi on June 21, 2022, 07:48:30 PM
2) that with JSON export all tags are listed ignoring no matter if I use -e or -a.

See the docs on the -j (-json) option
   The -a option is implied when -json is used
* 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).