ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: linuxuser on June 28, 2017, 10:28:03 AM

Title: Understanding of GPS-tags
Post by: linuxuser on June 28, 2017, 10:28:03 AM
I am debugging my bash-script and wonder why nothing is written with this simple code:

exiftool -q -q -overwrite_original -GPS:GPSAltitude="3333" "$NEWNAME"
exiftool -G -H -a -n "$NEWNAME" | grep -i altit



[XMP]                - GPS Altitude                    : 1000
[XMP]                - GPS Altitude Ref                : 0
[Composite]          - GPS Altitude                    : 1000

You see there is no altitude with 3333. It works eg to write another city tag with xmp and iptc. If this makes sense is another question.
Title: Re: Understanding of GPS-tags
Post by: Phil Harvey on June 28, 2017, 11:03:04 AM
There are many reasons why this could happen.  Try running the first command without -q -q to look at the messages from ExifTool to see what is happening.  If the file is not being written, check FAQ 23 (https://exiftool.org/faq.html#Q23).

- Phil
Title: Re: Understanding of GPS-tags
Post by: StarGeek on June 28, 2017, 01:28:22 PM
What is the file type?  If it is a video file, you will need to  write XMP tag, not GPS.

edit: To expand on this, now that I'm not on mobile, the GPS group (http://www.exiftool.org/TagNames/GPS.html) writes to the tags that are part of the EXIF standard.  Most video files do not contain EXIF data.  Exiftool can write to the XMP gps tags in video files and your output only contains XMP tags, which is why I questioned if it was a video file.  For ease of use, you might just write to GPSAltitude and let exiftool decide which tag is appropriate for the file.